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

Allow for query optimization #9

Open
bbarker opened this issue Feb 11, 2019 · 1 comment
Open

Allow for query optimization #9

bbarker opened this issue Feb 11, 2019 · 1 comment

Comments

@bbarker
Copy link
Contributor

bbarker commented Feb 11, 2019

I'm not suggesting this is necessarily easy to do, but wanted to open up the topic. It seems for the query API to be useful for most non-trivial cases, it may be necessary to allow for query optimizations to be defined in the native datastore being used (e.g., for SQL, this would be like using SQL itself (or some generator of SQL) to specify the exact query).

@agocorona
Copy link
Owner

Thanks for raising this topic. I had some ideas about how to do it but it is a bit tricky since doing direct queries to SQL would bypass the cache of STM registers. FIrst it would need a write from the cache to the database to make sure that every row is updated. It would require to add a new set of instances of RelationOps at indexQuery.hs which may return rows instead of DBRefs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants