-
Notifications
You must be signed in to change notification settings - Fork 109
analyzer: on aggregation queries with indexes, do not call to table when possible. #215
Comments
Cases:
WDYT @ajnavarro @src-d/data-retrieval? Any cases I missed with this? |
I've begin implementing this but I have noticed something that gets a little in the way of this: All this can be generalized into a single rule (not only for aggregations): when we have N columns in use for table T and we have an index for table T for all these columns. If columns are inside a With that, we replace the table node with an iterator that just reads the values from the index and puts That would not only work for aggregations but for any table that does not have an index yet. What are the problems?The problems come when we want to get the values from the index.
What are the use cases of this?Full-scan with no already available indexes (if it didn't have an index already, it won't have it with even more columns in the mix). For aggregations it needs the values to be usable, which, as we discussed before, cannot be done (right now). So we end up with this being only usable for queries with only this form: This case could be speed up by additionally storing in the mapping the number of rows for the index and replacing the whole query with a static number getting it from the index. How can this be solved?For starters, we could do the optimization for We need the following things from the index for this to be possible:
Thoughts? @ajnavarro @src-d/data-retrieval |
Discussed via slack: Things that should be done:
This is kept as paused until pilosa new version is released and we can ditch the mapping altogether. |
|
No description provided.
The text was updated successfully, but these errors were encountered: