Details
-
Improvement
-
Resolution: Fixed
-
Major
-
6.5.0, Morpheus, 6.6.5, 7.0.3, 7.1.0
-
1
Description
CREATE INDEX ix1 ON default (c1,c2); |
SELECT * FROM
|
default AS d |
WHERE d.c1 != 10 |
ORDER BY d.c2
|
LIMIT 100 |
OFFSET 10000; |
Above query not covered, not using index order so pagination not passed to indexer.
So end up fetching all qualified documents (instead of LIMIT only documents), then sort and apply pagination.
Here Indexer has all the information in predicate and order by (projection info is not there)
Alternative is as follows but very inconvenient.
|
SELECT d1.* FROM
|
default AS d1 USE KEYS (SELECT RAW META(d).id |
WHERE d.c1 != 10 |
ORDER BY d.c2
|
LIMIT 100 |
OFFSET 10000); |