-
Notifications
You must be signed in to change notification settings - Fork 5
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
Index usage for tag queries without values #30
Comments
Good catch. I thought that since they performed the same function they'd use the same index. Definitely worth changing. |
Some other queries finished and in the case of source_1 it's actually a 14257:1 speed difference. 21:1 would be for an 'average' tag. I'd fix it, but I'm not sure how to escape the ? properly.
|
Have you tried recompiling with the |
I also don't have a setup right now where I can easily compile java |
https://github.com/iandees/xapi-servlet/blob/master/src/main/java/com/yellowbkpk/geo/xapi/db/Selector.java#L37 builds a query string using
exist(tags, key)
but this does not use the GIN index set up in the documentation so ends up doing a sequential scan. A query withtags ? key
will use the index.In this example the cost is 21 times greater for the
exist()
query.The text was updated successfully, but these errors were encountered: