Method and apparatus for performing a join query in a database system
First Claim
Patent Images
1. A computer implemented method for generating a response to a join having a join predicate between a first table having a first plurality of fragments and a second table having a second plurality of fragments, the method comprising:
- retrieving a join fragment map that, for each respective fragment from the first table, identifies the fragments from the second table which contain a record that satisfies the join predicate with a record from the respective fragment from the first table;
using the map to eliminate fragments which cannot satisfy the join predicate; and
executing the join on the remaining fragments.
4 Assignments
0 Petitions
Accused Products
Abstract
A computer implemented method for generating a response to a join. Two tables are divided into fragments. A join fragment map identifies, for each respective fragment from the first table, the fragments from the second table which contain a record that satisfies the join predicate with a record from the respective fragment from the first table. The map is used to eliminate fragments which cannot satisfy the join predicate.
-
Citations
35 Claims
-
1. A computer implemented method for generating a response to a join having a join predicate between a first table having a first plurality of fragments and a second table having a second plurality of fragments, the method comprising:
-
retrieving a join fragment map that, for each respective fragment from the first table, identifies the fragments from the second table which contain a record that satisfies the join predicate with a record from the respective fragment from the first table; using the map to eliminate fragments which cannot satisfy the join predicate; and executing the join on the remaining fragments.
-
-
2. A computer-implemented method for processing a join between a first table having a first plurality of fragments and a second table having a second plurality of fragments, the method comprising:
-
retrieving a join fragment map that, for each respective fragment from the first table, identifies the fragments from the second table which contain a record that satisfies a join predicate of the join with a record from the respective fragment from the first table; identifying fragments possibly having records that satisfy the join predicate by applying the map; and executing the join on the identified fragments. - View Dependent Claims (3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. In a system operating to execute queries on database tables and supporting separation of tables into fragments, a computer-implemented method for applying a join operation to a first table and a second table, comprising:
-
identifying for each fragment of the first table those fragments of the second table that contain a record satisfying the join predicate with a record from the first table fragment and storing the identification in a map; identifying a first set of fragments from the first table having records satisfying a single-table predicate of the query; identifying a second set of fragments from the second table containing records that satisfy the join predicate with records from the first set of fragments by applying the map; and executing the query on the first set of fragments and the second set of fragments.
-
-
12. A computer-implemented method for processing a join between a first table having a first plurality of fragments and a second table having a second plurality of fragments, the method comprising:
-
retrieving a map that, for each respective fragment from the first table, identifies the fragments from the second table which contain a record that satisfies a join predicate of the join with a record from the respective fragment from the first table; receiving a record from the first table; using the map to identify a set of fragments from the second table which satisfy the join predicate with the fragment of the received record; and scanning the identified set of fragments for records that satisfy the join predicate with the received record. - View Dependent Claims (13)
-
-
14. A method of executing a query having a join operation with a join predicate that is applied to a first table and a second table that can be separated into fragments, comprising:
-
identifying, for each fragment of the first table, those fragments of the second table that contain a record satisfying the join predicate with a record from the first table fragment; storing a map that, for each fragment of the first table, indicates the identified fragments of the second table; receiving a record from the first table; identifying a set of fragments from the second table having records satisfying the join predicate with the received record by applying the map; and scanning the identified set of fragments for records that satisfy the join predicate with the received record.
-
-
15. In a database system supporting separation of tables into fragments, a method of optimizing a join having a join predicate on a first table and a second table, comprising:
executing a simplified query having the join predicate to create a join fragment map, the join fragment map identifying for each fragment of the first table those fragments of the second table that contain a record satisfying the join predicate with a record from the fragment of the first table. - View Dependent Claims (16, 17, 18, 19, 20, 21, 22)
-
23. In a database system supporting separation of tables into fragments, a method of optimizing a join having a join predicate on a first table and a second table, comprising:
-
executing a simplified query having the join predicate to create a join fragment map, the join fragment map identifying for each fragment of the first table those fragments of the second table that contain a record satisfying the join predicate with a record from the fragment of the first table, wherein the join fragment map is a bitmap having a bit for each pair of fragments from the first table and the second table. - View Dependent Claims (24, 25, 26, 27, 28)
-
-
29. In a database system supporting separation of tables into fragments, a method of optimizing a join having a join predicate on a first table and a second table, comprising:
-
executing a simplified query having the join predicate to create a join fragment map, the join fragment map identifying for each fragment of the first table those fragments of the second table that contain a record satisfying the join predicate with a record from the fragment of the first table; and storing the join fragment map in volatile memory.
-
-
30. In a database system supporting separation of tables into fragments, a method of optimizing a join having a join predicate on a first table and a second table, comprising:
-
executing a simplified query having the join predicate to create a join fragment map, the join fragment map identifying for each fragment of the first table those fragments of the second table that contain a record satisfying the join predicate with a record from the fragment of the first table; and creating the join fragment map by triggering an explicit user data definition command.
-
-
31. In a system operating to execute queries on relational database tables and supporting separation of tables into fragments, a method of optimizing a query having a join predicate on a first table and a second table, comprising:
-
identifying a first set of fragments being those fragments of the first table having records possibly satisfying the join predicate; identifying a second set of fragments being those fragments of the second table having records possibly satisfying the join predicate; and executing the query on the identified fragments. - View Dependent Claims (32, 33)
-
-
34. A method of processing join queries in a system operating to execute queries on relational database tables and supporting separation of tables into fragments, comprising:
-
executing a simplified query having the join predicate to create a join fragment map, the join fragment map identifying for each fragment of the first table those fragments of the second table that contain a record satisfying the join predicate with a record from the first table fragment; using the join fragment map to identify a first set of fragments being those fragments of the first table having records satisfying the join predicate; using the join fragment map to identify a second set of fragments being those fragments of the second table having records satisfying the join predicate; retrieving a record from a selected fragment from the first set of fragments; identifying a subset of fragments from the second set of fragments, the subset being those fragments of the second table having records satisfying the join predicate with the selected fragment; and scanning the subset of fragments for records satisfying the join predicate.
-
-
35. A computer program, residing on a computer-readable medium, comprising instructions causing a computer to operate to:
-
retrieve a join fragment map that, for each respective fragment from the a first table, identifies the fragments from the second table which contain a record that satisfies a join predicate with a record from the respective fragment from the first table; use the map to eliminate fragments which cannot satisfy the join predicate; execute the join on the remaining fragments.
-
Specification