Won't Fix
Details
Priority
MajorComponents
Assignee
KERNEL TEAMKERNEL TEAMReporter
Stephen MarquardStephen MarquardLabels
Details
Details
Priority
Components
Assignee
KERNEL TEAM
KERNEL TEAMReporter
Stephen Marquard
Stephen MarquardLabels
Created October 21, 2007 at 8:42 AM
Updated April 25, 2018 at 3:18 PM
Resolved October 25, 2013 at 3:19 PM
Accessing a single file, e.g.
wget --no-proxy http://qa1-za.sakaiproject.org/access/content/group/cd3c7352-e9bd-4d02-aaee-4adbbb8ab41f/eq_7c93c4.jpg
generates 2 queries to CONTENT HOSTING, viz.:
select RESOURCE_ID from CONTENT_RESOURCE where (RESOURCE_ID = '/group/cd3c7352-e9bd-4d02-aaee-4adbbb8ab41f/eq_7c93c4.jpg')
select XML, BINARY_ENTITY from CONTENT_RESOURCE where (RESOURCE_ID = '/group/cd3c7352-e9bd-4d02-aaee-4adbbb8ab41f/eq_7c93c4.jpg')
The first query is redundant because if the RESOURCE_ID doesnt' exist in the db then the 2nd query will return an empty set which can be checked for.
As content accesses are one of the highest-frequency events in production systems, optimization here is important for performance reasons.