20. A computer storage medium embedded with computer instructions executed by at least one processor to perform steps comprising: receiving a query configured according to a query template, the query including values for a plurality of parameters of the query template, the query comprising a plurality of efficiency expressions; managing a plurality of query plans using a selectivity space by: defining the selectivity space as an array of selectivity regions arranged according to a grid that has a number of dimensions equal to a number of efficiency expressions of the query, the grid, in accordance with the plurality of efficiency expressions, comprising a multi-dimensional grid divided into a plurality of multi-dimensional regions forming the array of selectivity regions, compiling the query to generate a first query plan, determining a selectivity region in the selectivity space for the query, generating a key for the query that includes an indication of the selectivity region, and storing the first query plan in association with the key; and executing the first query plan with respect to the query.
20. A computer storage medium embedded with computer instructions executed by at least one processor to perform steps comprising: receiving a query configured according to a query template, the query including values for a plurality of parameters of the query template, the query comprising a plurality of efficiency expressions; managing a plurality of query plans using a selectivity space by: defining the selectivity space as an array of selectivity regions arranged according to a grid that has a number of dimensions equal to a number of efficiency expressions of the query, the grid, in accordance with the plurality of efficiency expressions, comprising a multi-dimensional grid divided into a plurality of multi-dimensional regions forming the array of selectivity regions, compiling the query to generate a first query plan, determining a selectivity region in the selectivity space for the query, generating a key for the query that includes an indication of the selectivity region, and storing the first query plan in association with the key; and executing the first query plan with respect to the query. 21. The computer storage medium of claim 20 , wherein said generating a key for the query comprises: forming the key to include the query template and the indication of the selectivity region.