Efficient processing of queries in federated database systems
First Claim
1. A computer-implemented method for processing a federated query in a federated database system, wherein a database table is physically distributed across a first designated source server and a second designated source server, the method comprising:
- receiving a federated query at a federated database server;
generating a federated query execution plan at the federated database server, based on the received federated query, the federated query execution plan defining one or more source servers of the federated database and a unique subquery to be executed on each of the defined one or more source servers;
distributing each unique subquery to a defined source server, in accordance with the federated query execution plan;
executing each unique subquery asynchronously by the defined source server;
connecting a source server to a first designated source server among the one or more source servers, using a first message queue, and without the connection passing through the federated database server;
connecting a source server to a second designated source server among the one or more source servers, using a second message queue, and without the connection passing through the federated database server;
passing, based on parameters specified in the federated query, a first subset of the subquery results to the first designated source server, using the first message queue, and a second subset of the subquery results to the second designated source server, using the second message queue;
joining and aggregating the first subset of the subquery results by the first designated source server into a first final query result;
joining and aggregating the second subset of the subquery results by the second designated source server into a second final query result;
returning the first and second final query results to the federated database server; and
combining the first and second final query results at the federated database server.
1 Assignment
0 Petitions
Accused Products
Abstract
Methods and apparatus, including computer program products, implementing and using techniques for processing a federated query in a federated database system. A federated query is received at a federated database server. A federated query execution plan is generated based on the received federated query. The federated query execution plan defines one or more source servers of the federated database and a unique subquery to be executed on each of the source servers. The subqueries are distributed to the source servers in accordance with the federated query execution plan. The respective subqueries are executed asynchronously at the source servers. The subquery results are passed to a first designated source server defined in the federated query execution plan. The subquery results are joined and aggregated at the first designated source server into a final query result. The final query result is returned to the federated database server.
-
Citations
17 Claims
-
1. A computer-implemented method for processing a federated query in a federated database system, wherein a database table is physically distributed across a first designated source server and a second designated source server, the method comprising:
-
receiving a federated query at a federated database server; generating a federated query execution plan at the federated database server, based on the received federated query, the federated query execution plan defining one or more source servers of the federated database and a unique subquery to be executed on each of the defined one or more source servers; distributing each unique subquery to a defined source server, in accordance with the federated query execution plan; executing each unique subquery asynchronously by the defined source server; connecting a source server to a first designated source server among the one or more source servers, using a first message queue, and without the connection passing through the federated database server; connecting a source server to a second designated source server among the one or more source servers, using a second message queue, and without the connection passing through the federated database server; passing, based on parameters specified in the federated query, a first subset of the subquery results to the first designated source server, using the first message queue, and a second subset of the subquery results to the second designated source server, using the second message queue; joining and aggregating the first subset of the subquery results by the first designated source server into a first final query result; joining and aggregating the second subset of the subquery results by the second designated source server into a second final query result; returning the first and second final query results to the federated database server; and combining the first and second final query results at the federated database server. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A computer program product comprising a non-transitory tangible computer useable medium including a computer readable program, wherein the computer readable program when executed on a computer causes the computer to:
-
receive a federated query at a federated database server; generate a federated query execution plan at the federated database server, based on the received federated query, the federated query execution plan defining one or more source servers of the federated database and a unique subquery to be executed on each of the defined one or more source servers, wherein a database table is physically distributed across a first designated source server and a second designated source server; distribute each unique subquery to a defined source server, in accordance with the federated query execution plan; execute each unique subquery asynchronously by the defined source server; connect a source server to a first designated source server among the one or more source servers, using a first message queue, and without the connection passing through the federated database server; connect a source server to a second designated source server among the one or more source servers, using a second message queue, and without the connection passing through the federated database server; pass, based on parameters specified in the federated query, a first subset of the subquery results to the first designated source server, using the first message queue, and a second subset of the subquery results to the second designated source server, using the second message queue; join and aggregate the first subset of the subquery results by the first designated source server into a first final query result; join and aggregate the second subset of the subquery results by the second designated source server into a second final query result; return the first and second final query results to the federated database server; and combine the first and second final query results at the federated database server. - View Dependent Claims (10, 11, 12, 13, 14, 15, 16)
-
-
17. A federated database system for processing federated queries, comprising:
-
a federated database server; one or more source servers, wherein a database table is physically distributed across a first designated source server and a second designated source server; and a messaging system connecting the federated database server and the one or more source servers, wherein; the federated database server is operable to; receive a federated query; generate a federated query execution plan based on the received federated query, the federated query execution plan defining one or more source servers of the federated database and a unique subquery to be executed on each of the defined one or more source servers; distribute each unique subquery to a defined source server, in accordance with the federated query execution plan; the one or more source servers are operable to; execute each unique subquery asynchronously by the defined source server; connect a source server to a first designated source server among the one or more source servers, using a first message queue, and without the connection passing through the federated database server; connect a source server to a second designated source server among the one or more source servers, using a second message queue, and without the connection passing through the federated database server; pass, based on parameters specified in the federated query, a first subset of the subquery results to the first designated source server, using the first message queue, and a second subset of the subquery results to the second designated source server, using the second message queue; join and aggregate the first subset of the subquery results by the first designated source server into a first final query result; join and aggregate the second subset of the subquery results by the second designated source server into a second final query result; return the first and second final query results to the federated database server; and combine the first and second final query results at the federated database server.
-
Specification