Query optimization method based on MySOL database

A query optimization and database technology, applied in the field of network databases, can solve the problems of different capitalization, limiting MySQL query reuse technology, and low query reuse, and achieve the effect of improving utilization and eliminating low query reuse.

Inactive Publication Date: 2014-10-29
DALIAN UNIVERSITY
View PDF3 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] However, because plain text ASCII codes are used to store reused SQL statements, the SQL statements must be completely consistent to use the reuse technology, which has the disadvantage of low query reusability. For example, the two SQL statements select*fromtest and Select*fromtest are only uppercase and lowercase. Different, it will cause MySQL to not be able to reuse query results
[0005] In addition, if the amount of query result data is not large, it is better to use the cache method to save the result, but if the query data amount is particularly large, storing these results will consume a large amount of memory resources, resulting in a decrease in system performance, which is unreasonable , therefore, the above problems limit the practical application of MySQL query reuse technology

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
  • Query optimization method based on MySOL database

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0020] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.

[0021] like figure 1 As shown, a query optimization method based on MySQL database includes the following steps:

[0022] S1. Obtain an SQL query statement with invalid characters and / or capital letters;

[0023] S2. Calculate the hash value of each word in the SQL query statement;

[0024] S3, establish an array, store the hash value of the word and the first three characters of the word in the array, and use the hash value of the word as the subscript value of the array, so that the hash value matches the subscript of the array;

[0025] S4, loop through the words in the SQL query statement;

[0026] S5, if there is a word with an invalid character in the SQL query statement, determine that the word is a non-keyword, delete the invalid character in the non-keyword, and go to step S4;

[0027] S6, if there is a word, and the first 3 characte...

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 provides a query optimization method based on a MySOL database. The query optimization method based on the MySOL database is used for improving the utilization ratio of the MySQL query reusing optimization technology. The method comprises the following steps that (S1) SQL query sentences with invalid characters and / or capital letters are obtained; (S2) the Hash value of each word in the SQL query sentences is calculated; (S3) an array is established, the Hash value of each word and the first three letters of the corresponding word are stored in the array; (S4) words in the SQL query sentences are traversed in a circulation mode; (S5) one word with the invalid characters is found in the SQL query sentences; (S6) if the word with the first three letters identical with the three characters pre-stored in the array exists, the word is judged to be a keyword, and the word is converted into a normalized lower case format; (S7) the SQL query sentences with the keywords normalized are output; (S8) if the word with the first three letters different from the three characters of all the words pre-stored in the array exists, the word is judged to be a non-keyword.

Description

technical field [0001] The invention relates to the technical field of network databases, in particular to a query optimization method based on a MySQL database. Background technique [0002] With the increasingly widespread application of network databases, more and more data needs to be stored and queried. Therefore, the efficiency of database query will directly affect the application of system users. When the data volume of the database reaches hundreds of thousands or even more, the The bottleneck problem of the database will occur, so it is necessary to consider how to optimize the query performance of the database. [0003] The research of query reuse method is of great significance to the optimization of query technology. The MySQL database query reuse technology uses the query cache area to store the text string and query result set of the query statement, and share it with all clients. To improve the corresponding speed of the exact same Query statement. That is...

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): G06F17/30
CPCG06F16/2453
Inventor 汪祖民王阳
Owner DALIAN UNIVERSITY
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products