IP Library Granted Patent US 11,741,079
Granted Patent B1
US 11,741,079 · App. 17/666,236 · Granted Aug 29, 2023

Synthesized predicate driven index selection for partitioned table

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,741,079
App. No.
17/666,236
Filed
Feb 7, 2022
Granted
Aug 29, 2023
Kind
B1
Art Unit
2165
USPC
707/691
Abstract

A system and method for receiving a query of a partitioned table, the query including a first index predicate associated with a first partition key column; determining that one or more of the query is missing a second index predicate and the first index predicate is unusable for index probing; responsive to determining that one or more of the query is missing the second index predicate and the first index predicate is unusable for index probing, generating one or more synthesized predicates used to process the query using an index scan.

Claims (38)

1. A method comprising:

receiving, using one or more processors, a query of a table, the query including a first index predicate associated with a first key column;

determining, using the one or more processors, that one or more of the query is missing a second index predicate and the first index predicate is unusable for index probing; and

responsive to determining that one or more of the query is missing the second index predicate and the first index predicate is unusable for index probing, generating, using the one or more processors, one or more synthesized predicates used to process the query using an index scan.

2. The method of claim 1 , wherein it is determined that the query is missing the second index predicate, the method further comprising:

iterating over partition definitions of the table, wherein the table is partitioned; and

setting one or more values for a first synthesized predicate associated with the second index predicate determined to be missing.

3. The method of claim 1 , wherein the second index predicate is missing when there is no index predicate in the query associated with a second key column.

4. The method of claim 1 , wherein the second index predicate is associated with a second key column and the second key column is a second or subsequent key column in a local index.

5. The method of claim 1 , wherein the second index predicate is missing when there is no index predicate in the query associated with a second key column, and the second index predicate is a leading key to the first index predicate, which is included in the query.

6. The method of claim 1 , comprising:

determining that the query is missing a third index predicate associated with a third key column; and

responsive to determining that the query is missing the third index predicate, generating a synthesized predicate associated with the third index predicate.

7. The method of claim 1 , wherein it is determined that the first index predicate is unusable, the method further comprising:

iterating over partition definitions of the table, wherein the table is partitioned; and

setting one or more values for a first synthesized predicate associated with one of the first index predicate.

8. The method of claim 1 , wherein the first index predicate is unusable for index probing when the first index predicate includes an operator unusable for index probing without the one or more synthesized predicates, the one or more synthesized predicates including a synthesized predicate for the first index predicate.

9. The method of claim 1 , wherein the first index predicate is unusable for index probing when the first index predicate is itself usable for index probing, but makes an index predicate subsequent to first index predicate unusable for index probing without the one or more synthesized predicates, the one or more synthesized predicates including a synthesized predicate for the first index predicate.

10. The method of claim 1 , wherein the first index predicate is unusable for index probing and the first index predicate is one of a leading or middle predicate and associated with a range, thereby making a predicate subsequent to the first index predicate unusable for index probing without the one or more synthesized predicates, the one or more synthesized predicates including a synthesized predicate for the first index predicate.

11. The method of claim 1 , wherein the query includes a join operation and the query is processed using the index scan for the table.

12. The method of claim 1 , wherein the one or more synthesized predicates includes one or more of a first synthesized predicate associated with a list partition key column, wherein the table is partitioned using a partitioning scheme that includes list partitioning, and a second synthesized predicate for the first index predicate, the first index predicate associated with a range in the query and the first index predicate having a position other than as a last predicate of the query.

13. A system comprising:

one or more processors; and

a memory storing instructions that, when executed by the one or more processors, cause the system to:

receive a query of a table, the query including a first index predicate associated with a first key column;

determine that one or more of the query is missing a second index predicate and the first index predicate is unusable for index probing; and

responsive to determining that one or more of the query is missing the second index predicate and the first index predicate is unusable for index probing, generate one or more synthesized predicates used to process the query using an index scan.

14. The system of claim 13 , wherein the instructions, when executed by the one or more processors, further cause the system to:

iterate over partitions of the table, wherein the table is partitioned; and

set one or more values for a first synthesized predicate, the first synthesized predicate associated with the first index predicate, subsequent to the determination determining that the first index predicate is unusable for index probing, and associated with the second index predicate, subsequent to the determination determining that the query is missing the second index predicate.

15. The system of claim 13 , wherein the second index predicate is associated with a second key column and the second key column is a second or subsequent key column in a local index.

16. The system of claim 13 , wherein the second index predicate is missing when there is no index predicate in the query associated with a second key column, and the second index predicate is a leading key to the first index predicate, which is included in the query.

17. The system of claim 13 , wherein the instructions, when executed by the one or more processors, further cause the system to:

determining that the query is missing a third index predicate associated with a third key column; and

responsive to determining that the query is missing the third index predicate, generating a synthesized predicate associated with the third index predicate.

18. The system of claim 13 , wherein the first index predicate is unusable for index probing when the first index predicate includes an operator unusable for index probing without the one or more synthesized predicates, the one or more synthesized predicates including a synthesized predicate for the first index predicate.

19. The system of claim 13 , wherein the first index predicate is unusable for index probing when the first index predicate is itself usable for index probing without the one or more synthesized predicates, but makes an index predicate subsequent to first index predicate unusable for index probing without the one or more synthesized predicates, the one or more synthesized predicates including a synthesized predicate for the first index predicate.

20. The system of claim 13 , wherein the query includes a join operation and the query is processed using the index scan for the table.