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

The startswith (sw) operator on indexed JSON attribute is slow

    XMLWordPrintable

    Details

      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:
              ylecaillez Yannick Lecaillez
              Dev Assignee:
              Yannick Lecaillez Yannick Lecaillez
              QA Assignee:
              Ondrej Fuchsik Ondrej Fuchsik
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: