7447680

Method and Apparatus for Optimizing Execution of Database Queries Containing User-Defined Functions

PublishedNovember 4, 2008
Assigneenot available in USPTO data we have
Technical Abstract

Patent Claims
14 claims

Legal claims defining the scope of protection, as filed with the USPTO.

1

1. A method for database query optimization in a computer system, comprising the steps of: maintaining historical execution data with respect to each of a plurality of user-defined functions; receiving a database query having a plurality of logical conditions, said database query including at least one of said user-defined functions in at least one of said logical conditions; using said historical execution data to predict an optimal ordering of evaluation of said plurality of logical conditions; and evaluating said database query in accordance with said predicted optimal ordering of evaluation of said plurality of logical conditions; wherein said historical execution data comprises data from execution of said user-defined functions prior to evaluating said database query.

2

2. The method for database query optimization of claim 1 , wherein said database query includes a plurality of said user-defined functions, and wherein said step of using said historical execution data to predict an optimal ordering of evaluation comprises using said historical execution data to predict an optimal ordering of evaluation of said plurality of user-defined functions included in said database query.

3

3. The method for database query optimization of claim 1 , wherein said historical execution data comprises average cost of evaluation of each of said user-defined functions.

4

4. The method for database query optimization of claim 1 , wherein said historical execution data comprises average proportion of database query logical conditions evaluating to “true” for each of said user-defined functions.

5

5. The method for database query optimization of claim 1 , wherein said historical execution data comprises data from evaluation of said user-defined functions in satisfying said database query.

6

6. The method for database query optimization of claim 5 , wherein said step of using historical execution data to predict an optimal ordering of evaluation comprises: periodically re-determining an optimal ordering of evaluation a plurality of times while evaluating said database query, wherein each successive periodic re-determination of an optimal ordering uses said data from evaluation of said user-defined functions in satisfying said database query, said data from evaluation of said user-defined functions in satisfying said database query being updated from each previous periodic re-determination of an optimal ordering.

7

7. The method for database query optimization of claim 5 , wherein said step of using historical execution data to predict an optimal ordering of evaluation comprises using a weighted average of said data from evaluation of said user-defined functions in satisfying said database query and data from execution of said user-defined functions prior to evaluating said database query.

8

8. A method for database query optimization in a computer system, comprising the steps of: maintaining historical execution data with respect to each of a plurality of user-defined functions; receiving a database query having a plurality of logical conditions, said database query including at least one of said user-defined functions in at least one of said logical conditions; using said historical execution data to predict an optimal ordering of evaluation of said plurality of logical conditions; and evaluating said database query in accordance with said predicted optimal ordering of evaluation of said plurality of logical conditions; wherein said step of using said historical execution data to predict an optimum order of evaluation comprises predicting that logical conditions not containing user-defined functions be evaluated first, and, among multiple logical conditions containing respective user-defined functions, predicting an optimal order of evaluation using said historical execution data.

9

9. The method for database query optimization of claim 8 , wherein said historical execution data comprises average cost of evaluation of each of said user-defined functions.

10

10. The method for database query optimization of claim 8 , wherein said historical execution data comprises average proportion of database query logical conditions evaluating to “true” for each of said user-defined functions.

11

11. The method for database query optimization of claim 8 , wherein said historical execution data comprises data from evaluation of said user-defined functions in satisfying said database query.

12

12. The method for database query optimization of claim 11 , wherein said step of using historical execution data to predict an optimal ordering of evaluation comprises: periodically re-determining an optimal ordering of evaluation a plurality of times while evaluating said database query, wherein each successive periodic re-determination of an optimal ordering uses said data from evaluation of said user-defined functions in satisfying said database query, said data from evaluation of said user-defined functions in satisfying said database query being updated from each previous periodic re-determination of an optimal ordering.

13

13. The method for database query optimization of claim 11 , wherein said step of using historical execution data to predict an optimal ordering of evaluation comprises using a weighted average of said data from evaluation of said user-defined functions in satisfying said database query and data from execution of said user-defined functions prior to evaluating said database query.

14

14. The method for database query optimization of claim 8 , wherein said historical execution data comprises data from execution of said user-defined functions prior to evaluating said database query.

Patent Metadata

Filing Date

Unknown

Publication Date

November 4, 2008

Inventors

Paul Reuben Day
Brian Robert Muras

Want to explore more patents?

Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.

Citation & reuse

Analysis on this page is generated by Patentable — an AI-powered patent intelligence platform. AI-generated summaries, explanations, and analysis may be reused with attribution and a visible link back to the canonical URL below. Patent abstracts and claims are USPTO public domain.

Cite as: Patentable. “METHOD AND APPARATUS FOR OPTIMIZING EXECUTION OF DATABASE QUERIES CONTAINING USER-DEFINED FUNCTIONS” (7447680). https://patentable.app/patents/7447680

© 2026 Patentable. All rights reserved.

Patentable is a research and drafting-assistant tool, not a law firm, and does not provide legal advice. Documents we generate are drafts for review by a licensed patent attorney.