Patent ID: 8108399

Claim:
A computer program product comprising one or more computer readable storage media upon which computer executable instructions are encoded, the instructions when executed upon one or more computer processors providing for one or more components comprising: an indexing component that receives a query in a query retrieval system; extracts query predicates from the query; subdivides the query into a plurality of sub requests; analyzes attributes associated with predicate conditions of the query; determines that a slice index is to be generated for filtering criteria of the attributes associated with the predicate conditions, wherein the slice index is associated with a data set of the retrieval system associated with filtering criteria similar to that of the query; automatically derives and generates a slice index associated with the predicate conditions; optimizes the slice index for filtering by a particular set of attributes in an indexing space; stores the generated slice index in an auxiliary data structure for future use; and performs a cache lookup to verify whether the stored slice index is related to a second query; determines whether the stored slice index is a best match for the second query; when the stored slice index is a best match for the second query, re-uses the slice index in association with the second query; and when the stored slice index is not a best match for the second query, creates another slice index for filtering criteria associated with predicate conditions from the second query, wherein when the filtering criteria associated with the predicate conditions from the second query involve multiple candidate keys, then multiple indexes are built on-demand to satisfy the second query up to a limit based on heuristics involving cardinality estimates and available memory.