Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
A query like [1] with multiple path restrictions and an order can be extremely slow .
- Removing the orderby makes it much faste.
- Removing one path will make it faster.
The issue appears to be that, as soon as one path-restricred subquery is not handled at the index (ie its a traversal, since the cost of traversal on an empty path is 0), it appears that the entire sorting happens in the query engine which makes the query very very slow if there are lots of items (and defeats optimisations like guessTotal which prevent iteration / inflation of the complete result set).
[1]
( /jcr:root/content/dam/products//element(*, dam:Asset) | /jcr:root/content/dam/projects//element(*, dam:Asset)) order by jcr:content/@jcr:lastModified descendin )
Attachments
Issue Links
- links to