Database system for executing parameter-sensitive query
AssigneeMicrosoft Corporation
InventorsNimish S. Khanolkar, Pawel Terlecki, Cesar A. Galindo-Legaria, Yavor V. Angelov, Mostafa Elhemali, Pooja N. Darera
Life of this patent
Estimating the term…
Abstract
A query is received. The query comprises a plural number of efficiency expressions. A key is generated for the query indicating a first selectivity region in multi-dimensional selectivity space comprising an array of selectivity regions arranged according to a grid with a number of dimensions equal to the plural number. The generated key is used to look up a stored query plan among a plurality of stored query plans. A stored query plan is executed for the query that is associated with a stored key determined to match the generated key.
Claims20
A method in a data processing system that includes storage that stores data, and includes one or more processors configured to execute queries against the data, the method comprising:
- receiving a query comprising a plural number of efficiency expressions;
- generating, for the query, a key indicating a first selectivity region in a selectivity space comprising an array of selectivity regions arranged according to a grid with a number of dimensions equal to the plural number;
- and
- executing, for the query, a stored query plan associated with a stored key determined to match the generated key.
A system, comprising:
- a query interface configured to receive a query comprising a plurality of efficiency expressions;
- a key generator configured to generate a key for the query, the generated key indicating a first selectivity region in a selectivity space comprising an array of selectivity regions arranged according to a grid with a number of dimensions equal to a number of the plurality of efficiency expressions in the query;
- a query plan selector configured to determine whether the generated key matches a stored key among a plurality of stored keys;
- and
- a query execution module configured to execute, for the query, a stored query plan associated with a stored key determined to match the generated key.
A computer storage medium embedded with computer instructions executed by at least one processor to perform steps comprising:
- generating, for a query comprising a plural number of efficiency expressions, a key indicating a first selectivity region in multi-dimensional selectivity space comprising an array of selectivity regions arranged according to a grid with a number of dimensions equal to the plural number;
- using the generated key to look up a stored query plan among a plurality of stored query plans;
- and
- executing, for the query, a stored query plan associated with a stored key determined to match the generated key.
Dependencies are inferred from the claim text.