-
Notifications
You must be signed in to change notification settings - Fork 832
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
Wrong skiplist index usage in edge collection #2876
Comments
I would expect that too, thanks for reporting, managed to reproduce. As a quick fix you could do the following:
|
Your quick fix returns the same execution plan and doesn't use the right index either (3.1.21 on Windows) |
Wierd...
Seems to work on my end...
|
Ah is your Skiplist sparse? |
Tried all your recommendations but for some reasons, the query is analyzed differently on my machine :)
|
OK thanks for checking, then i need time to investigate, no more quick fix ideas in my head sorry. |
No worries, thanks a lot for your prompt reply and trying to find a workaround. I don't know if the query parser takes index selectivity into account? (which may explain the difference between your results and mine) |
Yes it takes the selectivity into account, but afaik the SORTING should always overrule FILTER only. |
So i get exactly your plan if and only if my skiplist is |
I think which index is picked here may depend on the amount of documents in the collection and the selectivity of the indexes. |
True that I was trying the query on my dev setup with a nearly empty DB, so:
-> so the combination of the 2 would be rather unique. Still, it uses the
So it would appear that the skiplist index would only be used when the selectivity of the |
Should be better with version 3.2.1. |
…ture/js_to_cpp_transaction_handler * 'devel' of https://github.com/arangodb/arangodb: fixed some issues detected by coverity scan (#2915) remove dependency on MMFiles features from non-MMFiles files (#2925) Converted rest handler for explain from JS to C++. (#2907) added startsBefore() for ApplicationFeature (#2913) Converted a portion of the admin routing API from JS to C++ (#2919) Bug fix/predictable results data modifcation multiple fors (#2921) Feature/cpp aql char length (#2883) slightly move responsibility for recovery (#2922) Feature/issue 387 cluster index estimates (#2866) Converted endpoint handler from JS to C++ (#2905) switch to trusty fixed issue #2876 (#2896) fix a race on shutdown (#2897) fixed issue #2868: cname missing from logger-follow results in rocksdb (#2901) make the V8 feature depend on the authentication feature (#2902) change "parameters" to "bindVars" (#2772) Do not allow replication to create/drop collections (#2898) don't mask errors with fake OOM messages (#2872)
3.2.1 has been released and is available for download. |
my environment running ArangoDB
I'm using the latest ArangoDB of the respective release series:
Mode:
Storage-Engine:
On this operating system:
this is an AQL-related issue:
I'm issuing AQL via:
web interface with this browser: running on this OS: Windows
In an edge collection named
hasPublished
, I create a skiplist index on the following fields:['_from', 'publishedAt']
I explain the following query:
for p in hasPublished filter p._from == 'from' sort p.publishedAt desc return p
and get:The text was updated successfully, but these errors were encountered: