Supercharge Your Innovation With Domain-Expert AI Agents!

An intelligent index recommendation method based on word frequency analysis of MySQL slow query log

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., to avoid multiple single-column indexes and objective indexes Effect

Active Publication Date: 2022-07-08
江苏艾佳家居用品有限公司
View PDF0 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
  • An intelligent index recommendation method based on word frequency analysis of MySQL slow query log
  • An intelligent index recommendation method based on word frequency analysis of MySQL slow query log
  • An intelligent index recommendation method based on word frequency analysis of MySQL slow query log

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0023] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.

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

[0025] Step A. For all the SQL query statements in the preset time range in the MySQL slow query log, obtain all the SQL query statements including the target table t field, and form a set R, wherein 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 times each query field appears in the set R, and obtain each field combination containing two query fields, and the two query fields in the field combination appear at the sam...

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, adopts a new design strategy, and based on mysql slow query log, performs pattern matching on recorded query statements, calculates the appearance of each query field and the combination of query fields The number of times, the query field is used as the node of the undirected graph, and the field combination is used as the edge of the graph, and an improved breadth-first traversal is performed on the generated undirected graph to find the longest subsequence as the optimal index; so based on the slow query sql for analysis, The obtained index is more objective and effective; and through the designed method, try to find the combined index with the largest coverage rate, and try to avoid the situation of multiple single-column indexes.

Description

technical field [0001] The invention relates to an index intelligent recommendation method based on word frequency analysis of MySQL slow query log, 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, providing pointers to the data values ​​stored in the specified columns of the table. A good index can greatly reduce the query time of SQL , to improve the responsiveness of the program. [0003] At present, creating indexes mainly depends on the experience of R&D engineers. When R&D engineers implement system functions, they create indexes at the same time when building tables through sql in the project and past experience, but there are two main problems here: 1. Lack of actual operation data of the project, the creation of the index is subjective, and sometimes it cannot be well matched with the actual SQL executi...

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
Patent Type & Authority Patents(China)
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