-
Notifications
You must be signed in to change notification settings - Fork 124
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
Use indexes in squashed tables #318
Comments
After thinking a bit about this, I think the way to go forward with this can be divided in two steps: First iteration: just make the indexing work here by also taking into account for the squashing Because the index release now works per-query there is no way to just release a few indexes and not others, so the downside of doing this is that all indexes involved in this query would be locked until it finishes, even though they are currently not being used because they're not for the topmost node. Second iteration: after having expression removal for indexes in go-mysql-server we will need a way to retrieve those expressions here. We cannot just insert a rule and do this with some analyzer magic because squashing tables rule needs to go after Pushdown, which needs to be after index assign. So, if expressions are removed from those steps, it means they're gone and there's no way around that. Another possible way forward is to just decide to keep all expressions, even if they are part of an index. The worst case would be and UDF that might be expensive, which in this case is only enry and is not that expensive. WDYT @ajnavarro? |
The first iteration was the same idea I came with, and the easiest one to make possible use the power of squash joins and indexes at the same time. I'm thinking in a way to push down filters from any comparison expression that is indexed, to make indexes usable for joins, per example. Maybe can be related to the second iteration. We can start with the first iteration that and then think about second steps. WDYT? |
Yep, I think it's better to do this first step now and tackle the other thing after we're in a more mature step with the indexes. |
In the middle of this I found a problem trying to fit together this two things:
This means we can't mix together this as it is. There would be two options for this:
WDYT? @ajnavarro |
Related to: src-d/go-mysql-server#187
The text was updated successfully, but these errors were encountered: