-
Notifications
You must be signed in to change notification settings - Fork 852
SKIPLIST index not used in AQL query #2116
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
@thierry-github You use sparse index. But when you make query You can change your query to:
or
These two queries say to optimiser that there are no records with null values in result. And optimiser will use your index. :) Or you can simply use non-sparse index, which indexes documents with null-values too. |
just tried this but same result. Here is the explanation result Query string: Execution plan: Indexes used: Optimization rules applied: Execution plan: Indexes used: Optimization rules applied: |
@thierry-github Optimiser doesn't works good with expression |
@DeShadow As you said that ArangoDB knows about it, i close the issue. Thanks for your answers. |
my environment running ArangoDB
I'm using the latest ArangoDB of the respective release series:
On this operating system:
I'm issuing AQL via:
In the documentation, it's written :
i have on collection named "content" with the following index :
i'have one record in the collection :
{
"field_one": "one",
"field_two": "two"
}
using this AQL query works correctly but doesn't involve index :
for record in content filter record.field_one == "one" return record
Associated explain result :
Query string:
for record in content filter record.field_one == "one" return record
Execution plan:
Id NodeType Est. Comment
1 SingletonNode 1 * ROOT
2 EnumerateCollectionNode 1 - FOR record IN content /* full collection scan /
3 CalculationNode 1 - LET #1 = (record.
field_one
== "one") / simple expression / / collections used: record : content */4 FilterNode 1 - FILTER #1
5 ReturnNode 1 - RETURN record
Indexes used:
none
Optimization rules applied:
none
using this query makes use of index :
for record in content FILTER record.field_one == "one" AND record.field_two == "two" return record
Indexes used:
By Type Collection Unique Sparse Selectivity Fields Ranges
6 skiplist content false true n/a [
field_one
,field_two
](%28record.field_one
==) && (record.field_two
== "two"))Am 'i missing somthing in index utilization ?
The text was updated successfully, but these errors were encountered: