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

Need a way to create index conditions for check and domain constraints #2687

Open
katzyn opened this issue Jun 4, 2020 · 0 comments
Open

Comments

@katzyn
Copy link
Contributor

katzyn commented Jun 4, 2020

New check and domain constraints need to check the existing data. This check can work faster in case of compatible index.

Check constraints generate an SQL, so they already can use indexes, but for other cases this step with select query construction slows down the things compared with direct iteration over TableFilter.

Domain constraints use the TableFilter directly and can't use indexes, but work faster when there are no compatible indexes anyway.

I think they both should use the very similar implementation with direct usage of TableFilter, but they need to create an unmapped clone of the expression, wrap it into ConditionNot and and map columns of TableFilter to it. For domain constraints the VALUE expressions should also be replaced with column expressions on this stage.

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

1 participant