Selecting candidate queries
First Claim
1. A method of processing a query, comprising:
- determining which particular candidate identification technique, of two or more candidate identification techniques available to a query-processing unit, to use to process the query;
wherein each candidate identification technique is a technique for identifying which semantically equivalent queries, of all possible semantically equivalent queries, will belong to a particular set of candidate queries;
determining an initial set of candidate queries for the query based on the particular candidate identification technique;
determining costs for one or more particular queries of the initial set of candidate queries;
choosing a particular query, from a set of candidate queries, based on costs for each query in the set of candidate queries, wherein the set of candidate queries includes the one or more particular queries; and
responding to a request to execute the query by executing the particular query.
1 Assignment
0 Petitions
Accused Products
Abstract
Iterative, linear, and exhaustive candidate selection techniques are described. In the techniques described herein, a set of semantically equivalent queries (also called a set of candidate queries) is determined for an incoming query based on a particular candidate selection technique. A choice is then made among the candidate queries, usually based on a cost measure, as to which query to execute or store for later execution. In one embodiment, there are multiple, available candidate selection techniques and before the set of candidate queries is determined, a choice of candidate selection techniques is made from among the available candidate selection techniques. The choice of candidate selection techniques may be made based on a configuration file or user input or based on some aspect of the query, the user, or the database on which the query will run.
174 Citations
124 Claims
-
1. A method of processing a query, comprising:
-
determining which particular candidate identification technique, of two or more candidate identification techniques available to a query-processing unit, to use to process the query;
wherein each candidate identification technique is a technique for identifying which semantically equivalent queries, of all possible semantically equivalent queries, will belong to a particular set of candidate queries;
determining an initial set of candidate queries for the query based on the particular candidate identification technique;
determining costs for one or more particular queries of the initial set of candidate queries;
choosing a particular query, from a set of candidate queries, based on costs for each query in the set of candidate queries, wherein the set of candidate queries includes the one or more particular queries; and
responding to a request to execute the query by executing the particular query. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75)
-
-
14. A method of processing a query, comprising:
-
receiving the query, wherein the query comprises one or more query blocks;
determining a set of candidate queries and costs for each query in the set of candidate queries, wherein each query in the set of candidate queries corresponds to a combination of possible alternative states for the one or more query blocks in the query, and wherein the set of candidate queries comprises all possible combinations of alternative states for the one or more query blocks;
choosing a particular query from the set of candidate queries based on the costs; and
responding to a request to execute the query by executing the particular query. - View Dependent Claims (15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90)
-
-
29. A method of processing a query, comprising:
-
receiving the query, wherein the query comprises one or more query blocks;
establishing a current-best query based on the query;
determining a set of candidate queries and costs corresponding to each candidate query in the set of candidate queries, wherein each candidate query in the set of candidate queries is determined based on the current-best query and an alternative state of a particular query block of the one or more query blocks, wherein if a particular cost associated with a particular candidate query satisfies a first particular mathematical relationship with a current-best cost for the current-best query, then the particular candidate query is established as the current-best query;
choosing a particular query from the set of candidate queries based on the costs for the candidate queries in the set of candidate queries; and
responding to a request to execute the query by executing the particular query. - View Dependent Claims (30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106)
-
-
45. A method of processing a query, comprising:
-
receiving the query, wherein the query comprises one or more query blocks;
determining multiple starting queries based on the query and one or more heuristics;
for each starting query of the multiple starting queries;
establishing the starting query as a local-best query;
determining a set of candidate queries and costs for each query in the set of candidate queries, wherein each candidate query in the set of candidate queries is determined based on the local-best query and an alternative state for a particular query block of the one or more query blocks, and wherein, if a first cost for the candidate query satisfies a first particular mathematical relationship with a local-best cost for the local-best query, then establishing the candidate query as the local-best query;
choosing a particular query from a set of local-best queries based on costs for each query in the set of local-best queries, wherein the set of local-best queries comprises the local-best query for each set of candidate queries; and
responding to a request to execute the query by executing the particular query. - View Dependent Claims (46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124)
-
Specification