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

[CBRD-25542] Problem with partition pruning when using multi-column indexes with IN and range predicates #5689

Draft
wants to merge 6 commits into
base: feature/partition-table
Choose a base branch
from

Conversation

Hamkua
Copy link
Contributor

@Hamkua Hamkua commented Dec 9, 2024

http://jira.cubrid.org/browse/CBRD-25542

Partition pruning does not work correctly in the following cases:

  • When the WHERE clause includes the following conditions:

    • An IN condition on the partition key column A

    • A range condition (e.g., > or <) on column B, which forms the same index as the partition key column A, without an equality condition on column B

  • Additionally, if the partitioned table has an index consisting of columns A, B, and others, and this index is used to scan the partitioned table.

The issue is caused by the use of a multi-column index.

With the addition of the MVCC feature, the where_range now contains a PRED_EXPR that compares a single column of the index. This has been modified to utilize where_range for partition pruning.

@Hamkua Hamkua self-assigned this Dec 9, 2024
@Hamkua Hamkua requested a review from beyondykk9 as a code owner December 9, 2024 03:09
@Hamkua Hamkua changed the title Problem with partition pruning when using multi-column indexes with IN and range predicates [CBRD-25542] Problem with partition pruning when using multi-column indexes with IN and range predicates Dec 10, 2024
@Hamkua Hamkua changed the base branch from develop to feature/partition-table December 19, 2024 07:06
@Hamkua Hamkua marked this pull request as draft December 24, 2024 04:38
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.

3 participants