Method and apparatus for eliminating partitions of a database table from a join query using implicit limitations on a partition key value
First Claim
Patent Images
1. A method for executing a database join query in a computer system, comprising the computer-executed steps of:
- identifying first and second tables of said join query, said first table comprising a plurality of partitions, each record of said first table containing a respective partition key value;
automatically determining whether data in said second table places an implicit limitation on the values of said partition key which satisfy said join query;
responsive to said step of automatically determining whether data in said second table places an implicit limitation on the values of said partition key which satisfy said join query, automatically eliminating from evaluation at least one partition which does not contain any values of said partition key satisfying said implicit limitation; and
automatically evaluating said join query only against partitions of said first table not eliminated by said automatically eliminating step.
1 Assignment
0 Petitions
Accused Products
Abstract
A database facility supports database join queries in a database environment having at least one database table divided into multiple partitions based on a partition key value. The facility determines whether the values in a table joined to the partitioned table place an implicit limitation on the partition key, and eliminates from query evaluation any partitions which do not satisfy the implicit limitation. Preferably, the database uses a star schema organization, in which implicit limitations in a relatively small dimension table are used to eliminate partitions in a relatively large fact table.
104 Citations
20 Claims
-
1. A method for executing a database join query in a computer system, comprising the computer-executed steps of:
-
identifying first and second tables of said join query, said first table comprising a plurality of partitions, each record of said first table containing a respective partition key value;
automatically determining whether data in said second table places an implicit limitation on the values of said partition key which satisfy said join query;
responsive to said step of automatically determining whether data in said second table places an implicit limitation on the values of said partition key which satisfy said join query, automatically eliminating from evaluation at least one partition which does not contain any values of said partition key satisfying said implicit limitation; and
automatically evaluating said join query only against partitions of said first table not eliminated by said automatically eliminating step. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A computer program product for executing a database join query comprising:
-
a plurality of computer-executable instructions recorded on signal-bearing media, wherein said instructions, when executed by at least one computer system, cause the at least one computer system to perform the steps of;
receiving a join query against information in a database, said join query joining at least two tables, including a first table having a plurality of partitions and a second table, each record of said first table containing a respective partition key value;
determining whether data in said second table places an implicit limitation on the values of said partition key which satisfy said join query;
responsive to said step of determining whether data in said second table places an implicit limitation on the values of said partition key which satisfy said join query, eliminating from evaluation at least one partition which does not contain any values of said partition key satisfying said implicit limitation; and
evaluating said join query only against partitions of said first table not eliminated by said automatically eliminating step. - View Dependent Claims (9, 10, 11, 12, 13)
-
-
14. A computer system, comprising:
-
at least one processor;
a data storage for storing a database, said database containing a plurality of database tables, including a partitioned database table having a plurality of partitions, each record of said partitioned database table containing a respective partition key value;
a database management facility embodied as a plurality of instructions executable on said at least one processor, said database management facility executing queries against data in said database, at least some of said queries being join queries joining said partitioned database table and at least one other said database table;
wherein said database management facility automatically determines, with respect to each of a plurality of said join queries joining said partitioned database table and at least one other said database table, whether data in the at least one other said database table of the respective join query places a respective implicit limitation on partitions of said partitioned database table which contain records satisfying the respective join query; and
wherein, responsive to determining that data in the at least one other said database table of the respective join query places a respective implicit limitation on partitions of said partitioned database table which contain records satisfying the respective join query, said database management facility automatically evaluates the respective join query only against partitions of said partitioned database table containing one or more respective records satisfying the respective implicit limitation. - View Dependent Claims (15, 16, 17, 18, 19, 20)
-
Specification