-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
sql: virtual table constrained scan #74806
Comments
cc @cockroachdb/sql-queries |
Well, you can push down a predicate which fully specifies a row with the virtualIndex construct. The problem with it is that it doesn't work if you want to scan a constrained portion of the virtual table. |
Ah good point, changed the title. |
We have marked this issue as stale because it has been inactive for |
Is your feature request related to a problem? Please describe.
Currently, there's no way perform an efficient constrained scan virtual table. That means, if a virtual table utilizes a regular SQL table under the hood, there's no way for the virtual table to utilize the indexes from the underlying SQL table, resulting in the bad bad query plans where SQL engine performs full table scan. This becomes more problematic if the sorting is involved which result in a small query fall back to disk spilling sort. E.g. #74680 #71245
Describe the solution you'd like
The virtual table
generator
/populate
hook should have the predicate information in order to make smarter decisions.Jira issue: CRDB-12275
Epic CRDB-14840
The text was updated successfully, but these errors were encountered: