METHOD AND APPARATUS FOR PARALLEL EXECUTION OF SQL-FROM WITHIN USER DEFINED FUNCTIONS
First Claim
1. A method of parallel execution of SQL in a user defined function comprising:
- obtaining an SQL command in a user defined function on a data server;
transmitting at least a portion of the SQL command to a query coordinator;
the query coordinator generating an execution plan that provides for parallel execution of the portion of the SQL command;
transmitting at least a portion of the execution plan from the query coordinator to a plurality of dispatcher instances on a plurality of data servers; and
the plurality of dispatchers executing the transmitted portions of the execution plan on the plurality of data servers.
2 Assignments
0 Petitions
Accused Products
Abstract
A method, apparatus, and an article of manufacture for parallel execution of SQL operations from within user defined functions. One or more embodiments of the invention provide the user defined function (UDF) with a C++ class (hereinafter referred to as “dispatcher”) that can take an SQL query and start parallel execution of the query. The query is optimized and parallelized. The dispatcher executes the query, sets up the communication links between the various operators in the query, and ensures that all the results are sent back to the data-server that originated the query request. Further, the dispatcher merges the results of the parallel execution and produces a single stream of tuples that is fed to the calling UDF. To provide the single stream to the calling UDF, one or more embodiments of the invention utilize a class that provides the UDF with a simple and easy-to-use interface to access the results of the nested SQL execution.
249 Citations
15 Claims
-
1. A method of parallel execution of SQL in a user defined function comprising:
-
obtaining an SQL command in a user defined function on a data server;
transmitting at least a portion of the SQL command to a query coordinator;
the query coordinator generating an execution plan that provides for parallel execution of the portion of the SQL command;
transmitting at least a portion of the execution plan from the query coordinator to a plurality of dispatcher instances on a plurality of data servers; and
the plurality of dispatchers executing the transmitted portions of the execution plan on the plurality of data servers. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A system for parallel execution of SQL in a user defined function comprising:
-
a data server configured to transmit at least a portion of an SQL command;
a user defined function on the data server, the user defined function comprised of the SQL command;
a dispatcher on the data server configured to;
receive portions of an execution plan; and
execute the received portions of the execution plan on a plurality of the data servers;
a query coordinator configured to;
receive the at least a portion of the SQL command;
generate the execution plan that provides for parallel execution of the portion of the SQL command; and
transmit at least a portion of the execution plan to a plurality of the dispatchers on a plurality of the data servers. - View Dependent Claims (7, 8, 9, 10)
-
-
11. An article of manufacture for parallel execution of SQL in a user defined function comprising:
-
means for obtaining an SQL command in a user defined function on a data server;
means for transmitting at least a portion of the SQL command to a query coordinator;
means for the query coordinator to generate an execution plan that provides for parallel execution of the portion of the SQL command;
means for transmitting at least a portion of the execution plan from the query coordinator to a plurality of dispatcher instances on a plurality of data servers; and
means for the plurality of dispatchers to execute the transmitted portions of the execution plan on the plurality of data servers. - View Dependent Claims (12, 13, 14, 15)
-
Specification