Techniques for partition pruning
First Claim
Patent Images
1. A computer-implemented method of partition pruning, comprising:
- receiving a query that requests retrieval of data items from a partitioned object;
wherein said partitioned object is partitioned based on a composite key;
wherein the query includes a predicate that specifies a condition involving a constituent key of said composite key;
wherein said constituent key does not constitute a prefix of said composite key;
for each partition of a plurality of partitions of said partitioned object, performing the steps of(a) determining a constituent-key-range for said constituent key;
(b) based on the constituent-key-range, determining whether it is possible for the partition to include key values that satisfy the condition; and
(c) if it is not possible for the partition to include key values that satisfy the condition, then pruning the partition to exclude the partition from consideration during execution of the query; and
wherein each partition of said plurality of partitions does not include any defined subpartitions;
wherein the method is performed by one or more computing devices.
1 Assignment
0 Petitions
Accused Products
Abstract
Techniques are described for performing partition pruning in situations where previous database servers could not. Specifically, techniques are provided for (1) performing partition pruning based on predicates that involve non-prefix subsets of composite partitioning keys, (2) performing partition pruning when a global index access path is used to execute a query, and (3) performing partition pruning when predicates on partitioning columns are OR-ed together. More generally, techniques are described for partition pruning based on a non-contiguous set of not-pruned partitions.
-
Citations
8 Claims
-
1. A computer-implemented method of partition pruning, comprising:
-
receiving a query that requests retrieval of data items from a partitioned object; wherein said partitioned object is partitioned based on a composite key; wherein the query includes a predicate that specifies a condition involving a constituent key of said composite key; wherein said constituent key does not constitute a prefix of said composite key; for each partition of a plurality of partitions of said partitioned object, performing the steps of (a) determining a constituent-key-range for said constituent key; (b) based on the constituent-key-range, determining whether it is possible for the partition to include key values that satisfy the condition; and (c) if it is not possible for the partition to include key values that satisfy the condition, then pruning the partition to exclude the partition from consideration during execution of the query; and wherein each partition of said plurality of partitions does not include any defined subpartitions; wherein the method is performed by one or more computing devices. - View Dependent Claims (2, 3)
-
-
4. A computer-implemented method of partition pruning, comprising:
-
during execution of a query that specifies a first condition that involves a first key, using a global index built on the first key to return rowids of rows that belong to a plurality of partitions of a partitioned table; and wherein the partitioned table is partitioned based on a second key; determining a set of not-pruned partitions based on a second condition, of the query, that involves the second key; for each rowid returned by said global index, performing the steps of; determining whether the rowid maps to a partition, of the plurality of partitions, that does not belong to said set of not-pruned partitions; and if the rowid maps to a partition, of the plurality of partitions, that does not belong to said set of not-pruned partitions, then discarding the rowid without probing into the partition; wherein the method is performed by one or more computing devices.
-
-
5. One or more machine-readable storage media storing instructions which, when executed by one or more processors, cause:
-
receiving a query that requests retrieval of data items from a partitioned object; wherein said partitioned object is partitioned based on a composite key; wherein the query includes a predicate that specifies a condition involving a constituent key of said composite key; wherein said constituent key does not constitute a prefix of said composite key; for each partition of a plurality of partitions of said partitioned object, performing the steps of (a) determining a constituent-key-range for said constituent key; (b) based on the constituent-key-range, determining whether it is possible for the partition to include key values that satisfy the condition; and (c) if it is not possible for the partition to include key values that satisfy the condition, then pruning the partition to exclude the partition from consideration during execution of the query; and wherein each partition of said plurality of partitions does not include any defined subpartitions. - View Dependent Claims (6, 7)
-
-
8. One or more machine-readable storage media storing instructions which, when executed by one or more processors, cause:
-
during execution of a query that specifies a first condition that involves a first key, using a global index built on the first key to return rowids of rows that belong to a plurality of partitions of a partitioned table; and wherein the partitioned table is partitioned based on a second key; determining a set of not-pruned partitions based on a second condition, of the query, that involves the second key; for each rowid returned by said global index, performing the steps of; determining whether the rowid maps to a partition, of the plurality of partitions, that does not belong to said set of not-pruned partitions; and if the rowid maps to a partition, of the plurality of partitions, that does not belong to said set of not-pruned partitions, then discarding the rowid without probing into the partition.
-
Specification