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

Optimize orderings by date fields

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0.4, 1.0.8
    • 1.1.4
    • query

    Description

      Sorting by date fields is very slow in oak, especially if result set size is large.

      I'm running the following JCR-SQL2 query

      SELECT * FROM [cq:PageContent] AS [c] WHERE ISDESCENDANTNODE('/content')
      

      which returns 3270 results on my oak repo.

      Query execution times are as below
      ---------------------------------------
      No order clause 		|  0,147 sec
      ORDER BY [jcr:title]	        |  1,203 sec
      ORDER BY [jcr:createdBy]	|  1,018 sec
      ORDER BY [jcr:created]		| 25,229 sec
      

      Ordering by date field adds extra 24 seconds overhead.

      Attachments

        1. OAK-2056-r1.patch
          8 kB
          Davide Giannella

        Activity

          People

            edivad Davide Giannella
            ppakulski Przemyslaw Pakulski
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: