-
Notifications
You must be signed in to change notification settings - Fork 852
Incorrect sorting with sort criteria partially covered by index #10440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think the dataset does not match the query somehow. However, I will make up some data on my own and try to reproduce. |
Reproduced. Looking into it... |
Right, sorry. I simply took the result of the query and forgot that it doesn't include a user_id. |
The above PRs address this issue. |
…ture/remove-db-properties-route * 'devel' of https://github.com/arangodb/arangodb: Feature/aql subquery splicing with gather (#10341) Add braces (#10460) fixed issue #10440: Incorrect sorting with sort criteria partially covered by index (#10442)
…re-3.5/query-timeout * '3.5' of https://github.com/arangodb/arangodb: Allow the optimizer to use indexes (#10543) Updated arangosync to 0.7.0 (#10532) Bug fix 3.5/little weekend fix (#10527) Bug fix 3.5/issue 10470 (#10497) add tests for inventory (#10464) (#10495) fixed issue #10440: Incorrect sorting with sort criteria partially covered by index (#10443) [3.5] Added precondition to ensure that server is still as seen before. (#10477) improve error message (#10478) allow in-place analyzer creation via link definition (#10466) (#10481) make replication timeouts configurable via startup options (#10473) [3.5] no coordinators left behind (#10420) don't return any in-progress indexes (#10431) fix invalid assertion (#10428) show type of index when non-implemented exception is thrown (#10425) Fix dump tests Improve syncer error message (#10404) DEVSUP-492 (#10379) (#10402)
Hi @mpoeter, Version 3.4.9, which includes a fix for the sorting, has just been released.
In case this issue still occurs after upgrading, please comment and we will reopen the ticket. Please find the latest release in the download section. |
My Environment
Component, Query & Data
Affected feature:
AQL query using web interface
AQL query (if applicable):
AQL explain (if applicable):
Problem:
The query optimizer recognizes correctly that the filter and the first sorting criterion are covered by the index on
[user_id, datetime, _key]
, so it removes them. However, this still leaves theSORT
node with the two remaining criteria and the query therefore produces a result that is not sorted correctly.Expected result:
Result is sorted correctly
Workaround:
Create an index that covers all fields used for sorting.
Steps to reproduce
activities
[user_id, datetime, _key]
The text was updated successfully, but these errors were encountered: