Skip to content
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

[query] Exploit AVET and VAET indexes in query engine #274

Open
gburd opened this issue Aug 6, 2020 · 0 comments
Open

[query] Exploit AVET and VAET indexes in query engine #274

gburd opened this issue Aug 6, 2020 · 0 comments
Labels

Comments

@gburd
Copy link

gburd commented Aug 6, 2020

The SQLite schema defining the datoms table (and the indexes upon it) specifies the AVET and VAET indexes as partial: see https://github.com/mozilla/mentat/blob/master/db/src/db.rs#L180-L181 and https://github.com/mozilla/mentat/blob/master/db/src/db.rs#L183-185. The only way the SQLite query engine can exploit those indexes is if the produced SQL constrains the query, in some way to have the relevant index_{avet,vaet} columns set -- and we don't do that right now.

There's a similar but technically distinct case that we do support. The :db/fulltext true case is managed as index_fulltext and as a separate table. If we wanted to, we could manage the partial indexes as separate tables manually. It's not clear what is the more desirable SQLite schema.

@gburd gburd added the A-query label Aug 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant