Method and mechanism for extending native optimization in a database system
First Claim
Patent Images
1. A method of optimizing 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, said optimizer function being selected from the group consisting of cost estimation function, selectivity function, and statistics collection function.
1 Assignment
0 Petitions
Accused Products
Abstract
A method and system for optimizing the execution of database statement is described. Optimization of database statements having non-boolean predicates is disclosed. Also disclosed is the determination and use of different granularity levels of information for submitting database statement predicates to optimizer-related functions.
30 Citations
49 Claims
-
1. A method of optimizing 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, said optimizer function being selected from the group consisting of cost estimation function, selectivity function, and statistics collection function. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
submitting information to said optimizer function indicating whether said lower bounding value is included in said range of values.
-
-
3. The method of claim 1 further comprising:
submitting information to said optimizer function indicating whether said upper bounding value is included in said range of values.
-
4. The method of claim 1 in which said optimizer function is a defined optimizer function for non-native objects.
-
5. The method of claim 1 in which said non-native objects is selected from the group consisting of user-defined index, user-defined index type, user-defined data type, user-defined column, and user-defined package.
-
6. The method of claim 1 in which said predicate is not a Boolean function.
-
7. The method of claim 1 in which said predicate is of the form Function( ) Relop Value-Expression.
-
8. The method of claim 7 in which Relop is selected from <
- , <
=, =, >
=, or >
.
- , <
-
9. A method of optimizing execution of a database statement comprising:
-
receiving a database statement comprising a predicate, wherein the predicate is not a 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. - View Dependent Claims (10, 11, 12, 13, 14, 15)
-
-
16. A method of optimizing 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, said one or more optimizer functions being functions selected from the group consisting of statistics functions, selectivity functions, and cost functions; and
estimating said costs for each of said plurality of possible execution plans. - View Dependent Claims (17, 18, 19)
-
-
20. 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:
-
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, said optimizer function being selected from the group consisting of cost estimation function, selectivity function, and statistics collection function. - View Dependent Claims (21, 22, 23, 24, 25)
submitting information to said optimizer function indicating whether said lower bounding value is included in said range of values.
-
-
22. The computer program product of claim 20, wherein said process further comprises:
submitting information to said optimizer function indicating whether said upper bounding value is included in said range of values.
-
23. The computer program product of claim 20 in which said optimizer function is a defined optimizer function for non-native objects.
-
24. The computer program product of claim 20 in which said non-native objects is selected from the group consisting of user-defined index, user-defined index type, user-defined data type, user-defined column, and user-defined package.
-
25. The computer program product of claim 20 in which said predicate is not a Boolean function.
-
26. 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:
-
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, said one or more optimizer functions being functions selected from the group consisting of statistics functions, selectivity functions, and cost functions; and
estimating said costs for each of said plurality of possible execution plans. - View Dependent Claims (27, 28, 29)
-
-
30. 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:
-
receiving a database statement comprising a predicate, wherein the predicate is not a 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. - View Dependent Claims (31, 32, 33, 34)
-
-
35. A system for optimizing execution of a database statement, said system comprising:
-
means for receiving a database statement comprising a predicate;
means for 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;
means for 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
means for using said optimizer function to estimate costs of an execution plan for said database statement, said optimizer function being selected from the group consisting of cost estimation function, selectivity function, and statistics collection function. - View Dependent Claims (36, 37, 38, 39, 40)
means for submitting information to said optimizer function indicating whether said lower bounding value is included in said range of values.
-
-
37. The system of claim 35, wherein said system further comprises:
means for submitting information to said optimizer function indicating whether said upper bounding value is included in said range of values.
-
38. The system of claim 35 in which said optimizer function is a defined optimizer function for non-native objects.
-
39. The system of claim 35 in which said non-native objects is selected from the group consisting of user-defined index, user-defined index type, user-defined data type, user-defined column, and user-defined package.
-
40. The system of claim 35 in which said predicate is not a Boolean function.
-
41. A system for optimizing execution of a database statement, said system comprising:
-
means for receiving a database statement for execution;
means for generating a plurality of possible execution plans to execute said database statement;
means for determining a granularity level of information regarding said database statement to use to estimate costs of said plurality of possible execution plans;
means for sending said information regarding said database statement at said granularity level to one or more optimizer functions, said one or more optimizer functions being functions selected from the group consisting of statistics functions, selectivity functions, and cost functions; and
means for estimating said costs for each of said plurality of possible execution plans. - View Dependent Claims (42, 43, 44)
-
-
45. A system for optimizing execution of a database statement, said system comprising:
-
means for receiving a database statement comprising a predicate, wherein the predicate is not a Boolean function;
means for submitting one or more range values to an optimizer function corresponding to the predicate;
means for determining an execution plan for the database statement based upon the one or more ranges; and
means for executing the execution plan. - View Dependent Claims (46, 47, 48, 49)
-
Specification