Skip to content

Conversation

@katzyn
Copy link
Contributor

@katzyn katzyn commented Mar 21, 2023

Closes #3762.

@grandinj
Copy link
Contributor

Or we could internally (during the optimize() calls), explode this kind of condition into

X == 1 AND Y == 2 AND Z == 3

and then let the normal logic handle it?

Or is there something that I am missing?

@katzyn
Copy link
Contributor Author

katzyn commented Mar 21, 2023

The main reason why I don't want to do such explosion is a possible future optimization of conditions like (A, B) > (?, ?) in presence of an index on columns (A, B) to a proper index condition like (A, B) > value. It isn't possible right now, in this PR a shorter index condition A >= value.firstColumn is generated.

@katzyn katzyn merged commit 55797e5 into h2database:master Mar 22, 2023
@katzyn katzyn deleted the row-value-comparion-index-conditions branch March 22, 2023 09:32
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

Successfully merging this pull request may close these issues.

Comparison predicates with row values don't create index conditions

2 participants