Method and apparatus for optimizing a merge-join operation across heterogeneous databases
First Claim
1. A method for performing an enhanced join operation at a local processor between data from at least two tables, one table stored in a remote database (hereafter "remote table") and a second table stored in a second database (hereafter "local table") in association with said local processor, said method comprising the steps of:
- a) during a compile time, analyzing (i) a received query, (ii) data relevant to said local table and said remote table and (iii) data entries to be joined from said local table, and providing a recommended predicate to be dispatched to said remote table in response to said received query, a first predicate listing each data value to be accessed from said remote table and a second predicate defining a range of data values to be accessed from said remote table;
b) during a run time, determining if a count of a number of data values in the local table to be joined with data values in the remote table exceeds or does not exceed a threshold value; and
(i) if the count exceeds the threshold value and said a second predicate is recommended, employing said second predicate in a query to a database management system (DBMS) which controls the remote table to access a range of data values and associated data therefrom; and
(ii) if the count does not exceed the threshold value and said first predicate is recommended, employing said first predicate in a query to said DBMS to access a specific list of data values and associated data from said remote table.
1 Assignment
0 Petitions
Accused Products
Abstract
An improved join operation is performed between data in at least two tables, with one of the tables stored in a remote database (hereafter "remote table") and another table stored in a local database (hereafter "local table"). The entry values in both the local table and the remote table are accessible in an ordered manner, based upon an order of the entry values. The method of the join operation generally includes the steps of: determining a count of a number of entry values that reside in the local table that are to be joined with entry values in the remote table; comparing the count with a threshold value, and (i) if the count exceeds the threshold value, issuing a query to the remote table to fetch a range of entry values therefrom, the range determined by the range of entry values to be joined from the local table; and (ii) if the count does not exceed the threshold value, issuing a query to the remote table to fetch each specific entry value that matches the entry values to be joined from the local table.
-
Citations
14 Claims
-
1. A method for performing an enhanced join operation at a local processor between data from at least two tables, one table stored in a remote database (hereafter "remote table") and a second table stored in a second database (hereafter "local table") in association with said local processor, said method comprising the steps of:
-
a) during a compile time, analyzing (i) a received query, (ii) data relevant to said local table and said remote table and (iii) data entries to be joined from said local table, and providing a recommended predicate to be dispatched to said remote table in response to said received query, a first predicate listing each data value to be accessed from said remote table and a second predicate defining a range of data values to be accessed from said remote table; b) during a run time, determining if a count of a number of data values in the local table to be joined with data values in the remote table exceeds or does not exceed a threshold value; and (i) if the count exceeds the threshold value and said a second predicate is recommended, employing said second predicate in a query to a database management system (DBMS) which controls the remote table to access a range of data values and associated data therefrom; and (ii) if the count does not exceed the threshold value and said first predicate is recommended, employing said first predicate in a query to said DBMS to access a specific list of data values and associated data from said remote table. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A memory media for controlling a local processor to perform an enhanced join operation between data from at least two tables, one table stored in a remote database (hereafter "remote table") and a second table stored in a second database (hereafter "local table") in association with said local processor, said memory media comprising:
-
a) means operative during a compile time to operate said local processor to analyze (i) a received query, (ii) data relevant to said local table and said remote table and (iii) data entries to be joined from said local table, and to provide a recommended predicate to be dispatched to said remote table in response to said received query, a first predicate listing each data value to be accessed from said remote table and a second predicate defining a range of data values to be accessed from said remote table; b) means operative during a run time to operate said local processor to determine if a count of a number of data values in the local table to be joined with data values in the remote table exceeds or does not exceed a threshold value; and (i) if the count exceeds the threshold value and said second predicate is recommended, to cause said local processor to employ said second predicate in a query for dispatch to a database management system (DBMS) which controls the remote table to access a range of data values and associated data therefrom; and (ii) if the count does not exceed the threshold value and said first predicate is recommended, to cause said local processor to employ said first predicate in a query for dispatch to said DBMS to access a specific list of data values and associated data from said remote table. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
Specification