The invention provides an index recommendation method and device,
electronic equipment, a storage medium and a program product, and belongs to the technical field of
data processing.The method comprises the steps that candidate composite indexes are determined based on the field distinction degree and the field occurrence frequency of multiple fields in a slow
query statement; and determining an optimal recommendation index based on the execution cost of the candidate
composite index. According to the index recommendation method and device, the
electronic equipment, the storage medium and the program product provided by the invention, semantic features of two dimensions of field distinction degree and field occurrence frequency are fully utilized for an existing slow
query statement with a poor index execution effect, and quantitative evaluation is performed through the execution cost of the candidate
composite index, so that the efficiency of the slow
query statement is improved. The advantages and disadvantages of the index are evaluated more comprehensively and objectively, the situation that the index created by depending on subjective experience does not accord with the actual situation is overcome, compared with a single-column index, the recommended
composite index can better improve the statement query performance of a
database, slow query is avoided, and better user experience is provided.