Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-6867

Enable index hints on UUID lookup query

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.7.14, 1.8.0
    • Component/s: query
    • Labels:
      None

      Description

      For the UUID lookup query I enabled the (recently added) query hints support where you can specify the index you want to be used and I got an interesting speedup in the benchmarks:

      Hint disabled, lookup by query
      # UUIDLookupTest                   C     min     10%     50%     90%     max       N 
      No of indexes (60) 60, Lookup by (lookupByQuery)[query] 
      Oak-Segment-Tar                    1       5       5       6       7      27    9837
      
      Hint enabled, lookup by query
      # UUIDLookupTest                   C     min     10%     50%     90%     max       N 
      No of indexes (60) 60, Lookup by (lookupByQuery)[query] 
      Oak-Segment-Tar                    1       5       5       6       7      13   10128
      
      Hint enabled, lookup by getNode
      # UUIDLookupTest                   C     min     10%     50%     90%     max       N 
      No of indexes (60) 60, Lookup by (lookupByQuery)[Session#getNodeByIdentifier] 
      Oak-Segment-Tar                    1       5       6       6       7      13    9447
      
      
      Hint disabled, lookup by getNode
      # UUIDLookupTest                   C     min     10%     50%     90%     max       N 
      No of indexes (60) 60, Lookup by (lookupByQuery)[Session#getNodeByIdentifier] 
      Oak-Segment-Tar                    1       3       3       3       4       8   17504
      

      It seems the cost shortcut is reducing the overall time, but cannot say for sure where this change comes from.
      The only change I did was to add option(index name uuid) to this query [0]

      Terry Mueller, Chetan Mehrotra what do you think?

      [0] https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/identifier/IdentifierManager.java#L356

        Attachments

          Activity

            People

            • Assignee:
              thomasm Thomas Mueller
              Reporter:
              stillalex Alex Deparvu

              Dates

              • Created:
                Updated:
                Resolved:

                Agile

                  Issue deployment