Systems and methods for performing index joins using auto generative queries
First Claim
1. A method for performing index joins, comprising:
- receiving, at a query processor in a database management system, an instruction to perform an index join operation between a column in a first table and a column in a second table, wherein the query processor does not have direct access to an index of the first table or an index of the second table for performing the index join operation;
determining that the column in the second table is indexed;
automatically generating a query having a where clause equality expression that equates the column in the second table with a parameter or updatable constant, wherein the query is automatically generated in response to determining that the column in the second table is indexed;
substituting a value from a row of the first table for the parameter or updatable constant;
executing the query on the index of the second table, wherein executing the query includes fetching indexed values stored at any one or more rows of the second table that satisfy the where clause, wherein a row of the second table satisfies the where clause by storing an indexed value that matches the substitute value;
repeating the substituting and executing steps for each row of the first table; and
performing the index join operation using the fetched indexed values.
1 Assignment
0 Petitions
Accused Products
Abstract
In accordance with the teachings described herein, systems and methods are provided for performing index joins. A database management application may receive an instruction to perform an index join operation between columns in a first table and a second table, wherein the database management application does not have direct access to an index of the first table or the second table for performing the index join operation. A query may be automatically generated by the database management application, wherein the query includes a where clause equality expression that equates an indexed column of the second table with a parameter or updatable constant. The database management application may substitute a value from a row of the first table may for the parameter or updatable constant, and cause the query to be executed on the index of the second table to fetch any one or more rows of the second table that satisfy the where clause by having an index value that matches the substituted value. The database management application may then repeat the substituting and executing operations for each row of the first table, and perform the index join operation using the fetched one or more rows.
15 Citations
19 Claims
-
1. A method for performing index joins, comprising:
-
receiving, at a query processor in a database management system, an instruction to perform an index join operation between a column in a first table and a column in a second table, wherein the query processor does not have direct access to an index of the first table or an index of the second table for performing the index join operation; determining that the column in the second table is indexed; automatically generating a query having a where clause equality expression that equates the column in the second table with a parameter or updatable constant, wherein the query is automatically generated in response to determining that the column in the second table is indexed; substituting a value from a row of the first table for the parameter or updatable constant; executing the query on the index of the second table, wherein executing the query includes fetching indexed values stored at any one or more rows of the second table that satisfy the where clause, wherein a row of the second table satisfies the where clause by storing an indexed value that matches the substitute value; repeating the substituting and executing steps for each row of the first table; and performing the index join operation using the fetched indexed values. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A system for performing index joins, comprising:
-
a database management application stored in a memory and executed by a processor, wherein the database management application includes instructions for causing the system to; receive an instruction to perform an index join operation between a column in a first table and a column in a second table, wherein the database management application does not have direct access to an index of the first table or an index of the second table for performing the index join operation; determine that the column in the second table is indexed; automatically generate a query having a where clause equality expression that equates the column of the second table with a parameter or updatable constant, wherein the query is automatically generated in response to determining that the column in the second table is indexed; substitute a value from a row of the first table for the parameter or updatable constant; execute the query on the index of the second table, wherein executing the query includes fetching indexed values stored at any one or more rows of the second table that satisfy the where clause, wherein a row of the second table satisfies the where clause by storing an indexed value that matches the substitute value; repeat the substituting and executing operations for each row of the first table; and perform the index join operation using the fetched indexed values. - View Dependent Claims (9, 10, 11, 12, 13)
-
-
14. A computer-program product for performing index joins, comprising:
-
a processor; and a non-transitory computer-readable medium having instructions stored thereon, the instructions operable to cause a computer to; receive an instruction to perform an index join operation between a column in a first table and a column in a second table, wherein a database management application does not have direct access to an index of the first table or an index of the second table for performing the index join operation; determine that the column in the second table is indexed; automatically generate a query having a where clause equality expression that equates the column of the second table with a parameter or updatable constant, wherein the query is automatically generated in response to determining that the column in the second table is indexed; substitute a value from a row of the first table for the parameter or updatable constant; execute the query on the index of the second table, wherein executing the query includes fetching indexed values stored at any one or more rows of the second table that satisfy the where clause, wherein a row of the second table satisfies the where clause by storing an indexed value that matches the substitute value; repeat the substituting and executing operations for each row of the first table; and perform the index join operation using the fetched indexed values. - View Dependent Claims (15, 16, 17, 18, 19)
wherein B is an identification of the second table, ? is a parameter, and B.Y identifies the indexed column of the second table.
-
-
19. The computer-program product of claim 14, wherein the query comprises the following command:
-
select * from B where <
value>
=B.Y,wherein B is an identification of the second table, <
value>
is an updatable constant, and B.Y identifies the indexed column of the second table.
-
Specification