Supercharge Your Innovation With Domain-Expert AI Agents!

Index intelligent recommendation method based on mysql slow query log word frequency analysis

A recommendation method and slow query technology, applied in database query, energy-saving computing, structured data retrieval, etc., can solve the problems of subjective index creation, inability to match, lack of project operation data, etc., and achieve the effect of avoiding multiple single-column indexes

Active Publication Date: 2020-06-02
江苏艾佳家居用品有限公司
View PDF2 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] The current creation of indexes mainly depends on the experience of R&D engineers. When implementing system functions, R&D engineers use the sql in the project and past experience to create indexes at the same time when building tables, but there are two main problems here: 1. Due to the lack of actual running data of the project, the creation of indexes is subjective, and sometimes it cannot match the actual SQL execution well; 2. It is biased towards single-column indexes, and cannot give full play to the advantages of combined indexes

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Index intelligent recommendation method based on mysql slow query log word frequency analysis
  • Index intelligent recommendation method based on mysql slow query log word frequency analysis
  • Index intelligent recommendation method based on mysql slow query log word frequency analysis

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0023] The specific implementation manners of the present invention will be further described in detail below in conjunction with the accompanying drawings.

[0024] The present invention designs an index intelligent recommendation method based on word frequency analysis of mysql slow query logs, which is used to obtain the optimal index corresponding to the target table t for a target table t in mysql that needs to recommend an index, including the following steps.

[0025] Step A. For all the sql query statements within the preset time range in the mysql slow query log, obtain all the sql query statements containing the t field of the target table to form a set R, where the number of sql query statements in the set R is N , then go to step B.

[0026] Step B. Obtain each query field in the set R, and obtain the number of occurrences of each query field in the set R, and obtain each field combination containing two query fields, and the two query fields in the field combinati...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention relates to an index intelligent recommendation method based on mysql slow query log word frequency analysis. The method comprises the steps of adopting a new design strategy, slowly querying a log based on mysql; carrying out pattern matching on the recorded query statements, calculating the occurrence frequency of each query field and a query field combination, taking the query fields as nodes of the undirected graph and the field combination as edges of the graph, and carrying out improved breadth-first traversal on the generated undirected graph so as to search the longest subsequence as an optimal index; therefore, analysis is carried out based on slow query sql, and the obtained index is more objective and effective; and the combined index with the maximum coverage rateis searched as much as possible through the design method, so that the situation of multiple single-column indexes can be avoided as much as possible.

Description

technical field [0001] The invention relates to an index intelligent recommendation method based on word frequency analysis of mysql slow query logs, and belongs to the technical field of data index recommendation. Background technique [0002] An index is a separate, physical storage structure that sorts the values ​​of one or more columns in a database table, and provides pointers to the data values ​​stored in the specified columns of the table. A good index can greatly reduce the query time of SQL , Improve the response speed of the program. [0003] The current creation of indexes mainly depends on the experience of R&D engineers. When implementing system functions, R&D engineers use the sql in the project and past experience to create indexes at the same time when building tables, but there are two main problems here: 1. Due to the lack of actual running data of the project, the creation of indexes is subjective, and sometimes it cannot be well matched with the actual...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F16/2457G06F16/24
CPCG06F16/2457G06F16/2433Y02D10/00
Inventor 陈旋王冲张平张鹏
Owner 江苏艾佳家居用品有限公司
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More