You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.
CREATE INDEX a ON commit_files USING pilosa (commit_hash);
CREATE INDEX b ON commit_files USING pilosa (file_path);
CREATE INDEX c ON commit_files USING pilosa (blob_hash);
And then tried to show explain for query:
EXPLAIN FORMAT=TREE SELECT *
FROM commit_files
WHERE
commit_hash = 'd5b04a971262372a1531119d595cd4b04db2949a' AND
file_path = '.gitignore' AND
blob_hash = 'a7904a1efc6ef7d25b358c0f7ee33259fb4512e0';
EXPLAIN shows that only index 'a' will be used (but all 3 indexes should be used).
I suppose it's because of the function indexesIntersection in assign_indexes.go:
where we merge index b into th a and then index c into intersection of a & b. At the end we have one lookupa merged with 2 operations (b, c). Moreover the name is still a so explain shows only a.
The same happens for other operations (not only for AND). We can change order of WHERE conditions to see that always the first one is showed by explain
The text was updated successfully, but these errors were encountered:
I created 3 indexes:
And then tried to show explain for query:
EXPLAIN
shows that only index'a'
will be used (but all 3 indexes should be used).I suppose it's because of the function
indexesIntersection
inassign_indexes.go
:where we merge index
b
into tha
and then indexc
intointersection of a & b
. At the end we have one lookupa
merged with 2 operations (b, c). Moreover the name is stilla
so explain shows onlya
.The same happens for other operations (not only for AND). We can change order of
WHERE
conditions to see that always the first one is showed byexplain
The text was updated successfully, but these errors were encountered: