Determining the optimal access path for a query at execution time using an actual value for each variable in a query for estimating a filter factor
First Claim
1. A method of executing a query in a computer, the query being performed by the computer to retrieve data from a database stored on a data storage device connected to the computer, the method comprising the step of:
- determining an optimal access path for the query at execution time using an actual value for each variable in the query to estimate a filter factor, wherein each variable is a special register.
1 Assignment
0 Petitions
Accused Products
Abstract
A method, apparatus, and article of manufacture for a computer implemented query compiler. A query is executed in a computer, the query being performed by the computer to retrieve data from a database stored on a data storage device connected to the computer. The query is received containing at least one variable. At execution time, a value is determined for each variable in the query. A filter factor is estimated using the determined value for each variable. Then, an access path is determined for the query using the estimated filter factor.
-
Citations
21 Claims
-
1. A method of executing a query in a computer, the query being performed by the computer to retrieve data from a database stored on a data storage device connected to the computer, the method comprising the step of:
determining an optimal access path for the query at execution time using an actual value for each variable in the query to estimate a filter factor, wherein each variable is a special register.
-
2. A method of executing a query in a computer, the query being performed by the computer to retrieve data from a database stored on a data storage device connected to the computer, the method comprising the step of:
determining an optimal access path for the query at execution time using an actual value for each variable in the query to estimate a filter factor, wherein the query is a static SQL statement and the step of determining an optimal access path further comprises the step of rebinding the static SQL statement. - View Dependent Claims (3, 4)
-
5. A method of executing a query in a computer, the query being performed by the computer to retrieve data from a database stored on a data storage device connected to the computer, the method comprising the step of:
determining an optimal access path for the query at execution time using an actual value for each variable in the query to estimate a filter factor, wherein the query is a dynamic SQL statement, and further comprising deferring the step of preparation of the dynamic SQL statement until an execute command is processed.
-
6. A method of executing a query in a computer, the query being performed by the computer to retrieve data from a database stored on a data storage device connected to the computer, the method comprising the step of:
determining an optimal access path for the query at execution time using an actual value for each variable in the query to estimate a filter factor, wherein the query is a dynamic SQL statement, and further comprising the step of deferring preparation of the dynamic SQL statement until a fetch command is processed.
-
7. A method of executing a query in a computer, the query being performed by the computer to retrieve data from a database stored on a data storage device connected to the computer, the method comprising the step of:
determining an optimal access path for the query at execution time using an actual value for each variable in the query to estimate a filter factor, wherein the query is a dynamic SQL statement, further comprising the step of deferring preparation of the dynamic SQL statement until an open command is processed.
-
8. An apparatus for executing a query, comprising:
-
a computer having a data storage device connected thereto, wherein the data storage device stores a database; one or more computer programs, performed by the computer, for determining an optimal access path for the query at execution time using an actual value for each variable in the query to estimate a filter factor, wherein each variable is a special register.
-
-
9. An apparatus for executing a query, comprising:
-
a computer having a data storage device connected thereto, wherein the data storage device stores a database; one or more computer programs, performed by the computer, for determining an optimal access path for the query at execution time using an actual value for each variable in the query to estimate a filter factor, wherein the query is a static SQL statement and the means for determining an optimal access path further comprises the means for rebinding the static SQL statement. - View Dependent Claims (10, 11)
-
-
12. An apparatus for executing a query, comprising:
-
a computer having a data storage device connected thereto, wherein the data storage device stores a database; one or more computer programs, performed by the computer, for determining an optimal access path for the query at execution time using an actual value for each variable in the query to estimate a filter factor, wherein the query is a dynamic SQL statement, and further comprising the means for deferring preparation of the dynamic SQL statement until an execute command is processed.
-
-
13. An apparatus for executing a query, comprising:
-
a computer having a data storage device connected thereto, wherein the data storage device stores a database; one or more computer programs, performed by the computer, for determining an optimal access path for the query at execution time using an actual value for each variable in the query to estimate a filter factor, wherein the query is a dynamic SQL statement, and further comprising the means for deferring preparation of the dynamic SQL statement until a fetch command is processed.
-
-
14. An apparatus for executing a query, comprising:
-
a computer having a data storage device connected thereto, wherein the data storage device stores a database; one or more computer programs, performed by the computer, for determining an optimal access path for the query at execution time using an actual value for each variable in the query to estimate a filter factor, wherein the query is a dynamic SQL statement, and further comprising the means for deferring preparation of the dynamic SQL statement until an open command is processed.
-
-
15. An article of manufacture comprising a computer program carrier readable by a computer and embodying one or more instructions executable by the computer to perform method steps for executing a query, the query being performed by the computer to retrieve data from a database stored in a data storage device connected to the computer, the method comprising the step of:
determining an optimal access path for the query at execution time using an actual value for each variable in the query to estimate a filter factor, wherein each variable is a special register.
-
16. An article of manufacture comprising a computer program carrier readable by a computer and embodying one or more instructions executable by the computer to perform method steps for executing a query, the query being performed by the computer to retrieve data from a database stored in a data storage device connected to the computer, the method comprising the step of:
determining an optimal access path for the query at execution time using an actual value for each variable in the query to estimate a filter factor, wherein the query is a static SQL statement and the step of determining an optimal access path further comprises the step of rebinding the static SQL statement. - View Dependent Claims (17, 18)
-
19. An article of manufacture comprising a computer program carrier readable by a computer and embodying one or more instructions executable by the computer to perform method steps for executing a query, the query being performed by the computer to retrieve data from a database stored in a data storage device connected to the computer, the method comprising the step of:
determining an optimal access path for the query at execution time using an actual value for each variable in the query to estimate a filter factor, wherein the query is a dynamic SQL statement, and further comprising deferring the step of preparation of the dynamic SQL statement until an execute command is processed.
-
20. An article of manufacture comprising a computer program carrier readable by a computer and embodying one or more instructions executable by the computer to perform method steps for executing a query, the query being performed by the computer to retrieve data from a database stored in a data storage device connected to the computer, the method comprising the step of:
determining an optimal access path for the query at execution time using an actual value for each variable in the query to estimate a filter factor, wherein the query is a dynamic SQL statement, and further comprising the step of deferring preparation of the dynamic SQL statement until a fetch command is processed.
-
21. An article of manufacture comprising a computer program carrier readable by a computer and embodying one or more instructions executable by the computer to perform method steps for executing a query, the query being performed by the computer to retrieve data from a database stored in a data storage device connected to the computer, the method comprising the step of:
determining an optimal access path for the query at execution time using an actual value for each variable in the query to estimate a filter factor, wherein the query is a dynamic SQL statement, and further comprising the step of deferring preparation of the dynamic SQL statement until an open command is processed.
Specification