Uploaded image for project: 'OpenDJ'
  1. OpenDJ
  2. OPENDJ-7466

Backport OPENDJ-7450: The startswith (sw) operator on indexed JSON attribute is slow

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.5.3, 7.0.0
    • Fix Version/s: 7.0.1
    • Component/s: None

      Description

      A customer migrating its IDM store from MySQL to DS noticed slow performance on the "startwith" query (less than one operation per second) while the attribute is indexed.

      ./searchrate -p 1636 --useSSL -D "uid=admin" -w "5up3r53cr3t" -F -c 8 -t 8 -b "ou=user,ou=managed,dc=openidm,dc=forgerock,dc=com" "(fr-idm-managed-user-json:caseIgnoreJsonQueryMatchManagedUser:=/userName sw \"A-A-103377\")"
      
      --------------------------------------------------------------------------------------------
      |     Throughput    |                 Response Time                |       Additional      | 
      |    (ops/second)   |                (milliseconds)                |       Statistics      | 
      |   recent  average |   recent  average    99.9%   99.99%  99.999% |  err/sec Entries/Srch | 
      --------------------------------------------------------------------------------------------
      |      0.0      0.0 |        -        -     0.00     0.00     0.00 |      0.0            - | 
      |      0.0      0.0 |        -        -     0.00     0.00     0.00 |      0.0            - | 
      |      0.0      0.0 |        -        -     0.00     0.00     0.00 |      0.0            - | 
      |      0.0      0.0 |        -        -     0.00     0.00     0.00 |      0.0            - | 
      |      0.0      0.0 |        -        -     0.00     0.00     0.00 |      0.0            - | 
      |      0.0      0.0 |        -        -     0.00     0.00     0.00 |      0.0            - | 
      |      0.0      0.0 |        -        -     0.00     0.00     0.00 |      0.0            - | 
      |      0.0      0.0 |        -        -     0.00     0.00     0.00 |      0.0            - | 
      |      0.0      0.0 |        -        -     0.00     0.00     0.00 |      0.0            - | 
      |      0.0      0.0 |        -        -     0.00     0.00     0.00 |      0.0            - | 
      |      0.0      0.0 |        -        -     0.00     0.00     0.00 |      0.0            - | 
      |      0.0      0.0 |        -        -     0.00     0.00     0.00 |      0.0            - | 
      |      0.0      0.0 |        -        -     0.00     0.00     0.00 |      0.0            - | 
      |      0.0      0.0 |        -        -     0.00     0.00     0.00 |      0.0            - | 
      |      0.0      0.0 |        -        -     0.00     0.00     0.00 |      0.0            - | 
      |      0.0      0.0 |        -        -     0.00     0.00     0.00 |      0.0            - | 
      |      0.0      0.0 |        -        -     0.00     0.00     0.00 |      0.0            - | 
      |      0.0      0.0 |        -        -     0.00     0.00     0.00 |      0.0            - | 
      |      0.0      0.0 |        -        -     0.00     0.00     0.00 |      0.0            - | 
      |      0.2      0.0 | 97753.148 97753.148 98247.38 98247.38 98247.38 |      0.0          0.0 | 
      |      0.0      0.0 |        - 97753.148 98247.38 98247.38 98247.38 |      0.0            - | 
      
      

       

      The cause seems to be a bug in "range" index query where the end-key is set too far forcing the query to cursor all the keys for a given JSON attribute.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ondrej.fuchsik Ondrej Fuchsik
              Reporter:
              cjr Chris Ridd
              Dev Assignee:
              Chris Ridd Chris Ridd
              QA Assignee:
              Ondrej Fuchsik Ondrej Fuchsik
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: