Claims
- 1. A method of optimizing the execution of a database statement, comprising:
receiving a database statement comprising a predicate; submitting a lower bounding value to an optimizer function, said lower bounding value defining a lower boundary of a range of values for said predicate; submitting an upper bounding value to said optimizer function, said upper bounding value defining an upper boundary of said range of values for said predicate; and using said optimizer function to estimate costs of an execution plan for said database statement.
- 2. The method of claim 1 in which said optimizer function is selected from the group consisting of cost estimation function, selectivity function, and statistics collection function.
- 3. The method of claim 1 further comprising:
submitting information to said optimizer function indicating whether said lower bounding value is included in said range of values.
- 4. The method of claim further comprising:
submitting information to said optimizer function indicating whether said upper bounding value is included in said range of values.
- 5. The method of claim 1 in which said optimizer function is a defined optimizer function for non-native objects.
- 6. The method of claim 5 in which said non-native objects is selected from the group consisting of user-defined index, user-defined indextype, user-defined data type, user-defined column, and user-defined package.
- 7. The method of claim 1 in which said predicate is not a boolean function.
- 8. The method of claim 1 in which said predicate is of the form Function( ) Relop Value-Expression.
- 9. The method of claim 8 in which Relop is selected from <, <=, =,>=, or >.
- 10. A method of optimizing the execution of a database statement, the database statement comprising a predicate having a non-boolean function, the method comprising:
receiving a database statement comprising a predicate, the predicate comprising a non-boolean function; submitting one or more range values to an optimizer function corresponding to the predicate; determining an execution plan for the database statement based upon the one or more ranges; and executing the execution plan.
- 11. The method of claim 10 in which the one or more range values comprise a lower bounding value for a range.
- 12. The method of claim 10 in which the one or more range values comprise a higher bounding value for a range.
- 13. The method of claim 10 in which the one or more range values indicates an inclusion or an exclusion from a range.
- 14. The method of claim 10 in which said optimizer function is selected from the group consisting of cost estimation function, selectivity function, and statistics collection function.
- 15. The method of claim 10 in which said predicate is of the form Function( ) Relop Value-Expression.
- 16. The method of claim 15 in which Relop is selected from <, <=, =,>=, or >.
- 17. A method of optimizing an execution of a database statement, comprising:
receiving a database statement for execution; generating a plurality of possible execution plans to execute said database statement; determining a granularity level of information regarding said database statement to use to estimate costs of said plurality of possible execution plans; sending said information regarding said database statement at said granularity level to one or more optimizer functions; and estimating said costs for each of said plurality of possible execution plans.
- 18. The method of claim 17 in which said one or more optimizer functions are functions selected from the group consisting of statistics functions, selectivity functions, and cost functions.
- 19. The method of claim 17 in which said granularity level is determined based upon characteristics of one or more database entities accessed by said database statement.
- 20. The method of claim 17 in which said granularity level is determined based upon system conditions at time of execution of said database statement.
- 21. The method of claim 19 in which said granularity level is determined when said one or more optimizer functions are created.
- 22. A computer program product that includes a medium readable by a processor, the medium comprising a sequence of instructions which, when executed by said processor, causes said processor to execute a process to optimize execution of a database statement, said process comprising the acts of:
receiving a database statement comprising a predicate; submitting a lower bounding value to an optimizer function, said lower bounding value defining a lower boundary of a range of values for said predicate; submitting an upper bounding value to said optimizer function, said upper bounding value defining an upper boundary of said range of values for said predicate; and using said optimizer function to estimate costs of an execution plan for said database statement.
- 23. A computer program product that includes a medium readable by a processor, the medium comprising a sequence of instructions which, when executed by said processor, causes said processor to execute a process to optimize execution of a database statement, said process comprising the acts of:
receiving a database statement for execution; generating a plurality of possible execution plans to execute said database statement; determining a granularity level of information regarding said database statement to use to estimate costs of said plurality of possible execution plans; sending said information regarding said database statement at said granularity level to one or more optimizer functions; and estimating said costs for each of said plurality of possible execution plans.
- 24. A computer program product that includes a medium readable by a processor, the medium comprising a sequence of instructions which, when executed by said processor, causes said processor to execute a process to optimize execution of a database statement, said process comprising the acts of:
receiving a database statement comprising a predicate, the predicate comprising a non-boolean function; submitting one or more range values to an optimizer function corresponding to the predicate; determining an execution plan for the database statement based upon the one or more ranges; and executing the execution plan.
CROSS-REFERENCE TO RELATED APPLICATIONS
[0001] The present application is a continuation of U.S. application Ser. No. 09/272,691, filed on Mar. 18, 1999, which is hereby incorporated by reference in its entirety.
Continuations (1)
|
Number |
Date |
Country |
Parent |
09272691 |
Mar 1999 |
US |
Child |
10096008 |
Mar 2002 |
US |