Patent ID: 8458167

Claim:
A computer program product comprising: a non-transitory computer readable storage medium having computer readable program code for complementing a server-based index adviser with a client-based index advisor, said computer program product including: computer readable program code determining a level of support from a server associated with a database management system (DBMS), said DBMS with a native index advisor and with external virtual index support; computer readable program code recommending at least one potential index based on enumerating sets of potential indexes and estimating a cost of a workload, wherein enumeration is done via an optimizer as a combination of a best indexes first and try variation algorithm as follows: computer readable program code locating candidate indexes, computer readable program code determining a cost of each query with existing indexes, re-determining the cost of each query with all candidate indexes, computer readable program code computing a cost benefit ratio of each index in said candidate indexes, wherein the steps of locating, determining, re-determining, and computing are repeated for every query in the workload and the cost benefit ratio of the candidate indexes is updated, and candidate indexes are sorted by cost benefit ratio and highest efficiency ones are picked until disk space is exhausted wherein, after highest efficiency indexes are picked, they are removed and said optimizer is run k times to locate next best choices for up to k times to locate top k choices for said optimizer, computer readable program code swapping a small subset from said k-choices for indexes with a tower cost benefit ratio, and if the new set has a higher overall cost benefit ratio than the previous set of highest efficiency indexes, it is retained, otherwise, computer readable program code discarding the new set and utilizing the previous set of highest efficiency indexes; and computer readable program code outputting results of the enumeration.