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.
- 2. The method of claim 1 wherein the transmitting at least a portion of the SQL command, the transmitting at least a portion of the execution plan, and the query coordinator are transparent to the user defined function.
- 3. The method of claim 1 further comprising:
one or more of said plurality of dispatchers merging results of the execution; specifying an endpoint to retrieve the merged results; and providing the user defined function with a mechanism for retrieving the results in a stream from the specified endpoint.
- 4. The method of claim 3 wherein the input stream comprises one or more tuples.
- 5. The method of claim 1 wherein said generating further comprises:
a query optimizer generating an ASCII plan; and a parallelizer generating a parallel execution plan;
- 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.
- 7. The system of claim 6 wherein the query coordinator and the operations of the dispatcher are transparent to the user defined function.
- 8. The system of claim 6 further comprising:
the dispatcher further configured to:
merge one or more results of execution of said execution plan; and provide said results to a specified endpoint; and the user defined function further configured to retrieve the merged results in a stream from the specified endpoint.
- 9. The system of claim 8 wherein the input stream comprises one or more tuples.
- 10. The system of claim 6 further comprising:
a query optimizer in the query coordinator, the query optimizer configured to generate an ASCII plan from the portion of SQL; and a parallelizer in the query coordinator, the parallelizer configured to generate a parallel execution plan from said ASCII plan.
- 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.
- 12. The article of manufacture of claim 11 wherein the means for transmitting the portion of the SQL command, the means for transmitting at least a portion of the execution plan, and the query coordinator are transparent to the user defined function.
- 13. The article of manufacture of claim 11 further comprising:
means for one or more of said plurality of dispatchers to merge results of the execution; means for specifying an endpoint to retrieve the merged results; and means for providing the user defined function with a mechanism for retrieving the results in a stream from the specified endpoint.
- 14. The article of manufacture of claim 13 wherein the input stream comprises one or more tuples.
- 15. The article of manufacture of claim 11 wherein said means for generating further comprises:
means for a query optimizer to generate an ASCII plan; and means for a parallelizer to generate a parallel execution plan;
CROSS REFERENCE TO RELATED APPLICATIONS
[0001] This application is related to the following co-pending and commonly assigned patent applications, which are incorporated by reference herein:
[0002] Application Ser. No. ______ entitled “METHOD AND APPARATUS FOR PARALLEL EXECUTION OF SQL FROM STORED PROCEDURES” filed on the same date herewith, by Navin Kabra, Jignesh Patel, Jie-Bing Yu, Biswadeep Nag, and Jian-Jun Chen, attorney's docket number 8344.
[0003] Application Ser. No. ______ entitled “METHOD AND APPARATUS FOR FETCHING ARRAY BASED OBJECTS BY DIRECT DELIVERY AND BATCHING” filed on Nov. 24, 1999, by Zhe Wang, Biswadeep Nag, Jie-Bing Yu, and Jignesh Patel, attorney's docket number 8342.
[0004] Application Ser. No. ______ entitled “QUERY MONITOR PLAYBACK MECHANISM FOR POST-MORTEM PERFORMANCE ANALYSIS” filed on Nov. 24, 1999, by Jie-Bing Yu, Jun Li, and Karthikeyan Ramasamy, attorney's docket number 8343.