Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-38692

Unnecessary query for every content access

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.6.x, 2.7.x
    • Fix Version/s: None
    • Component/s: Kernel
    • Labels:
    • Previous Issue Keys:
      SAK-12011, KNL-473

      Description

      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.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                k1team KERNEL TEAM (Inactive)
                Reporter:
                smarquard Stephen Marquard
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Source Code