Query optimization method for MySQL database based on Redriver

A query optimization and database technology, applied in the field of MySQL database query, can solve problems such as unfavorable and rapid problem solving, long process and time, and achieve the effect of convenient query, saving rewriting time, and speeding up query speed.

Active Publication Date: 2020-08-04
HANGZHOU QUWEI SCI & TECH
View PDF6 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] However, both of the above two existing optimization methods need to change the structured query language (sql), so the application program needs to be republished after the structured query language (sql) change is completed, so that from finding the problem to solving it The problem needs to go through a long process and time, which is not conducive to solving the problem quickly, and is contrary to the purpose of quick solution optimization

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 for MySQL database based on Redriver
  • Query optimization method for MySQL database based on Redriver

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0035] A query optimization method based on Rewriter's MySQL database, comprising the following steps:

[0036] Step S1: install the Rewriter plug-in on the database instance of the database management system (MySQL);

[0037] Step S2: enable the Rewriter plug-in, and create the environment required by the plug-in;

[0038] Step S3: capture the original structured query language (sql), and set the timing task of the task scheduler (Event); the event can save the result set of the original structured query language (sql) into the newly created table;

[0039] Step S4: Write rewrite rules, and add the rewrite rules to the "rewrite_rules" table;

[0040] Step S5: Load the rewrite rules from the "rewrite_rules" table into the memory by calling the "flush_rewrite_rules()" function, so that the rewrite rules take effect;

[0041] Step S6: Realize quick query of cache according to Rewriter and Event.

[0042] Installing the Rewriter plug-in in the database management system (MySQL...

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 discloses a query optimization method for a MySQL database based on a Redriver. The query optimization method comprises the following steps: S1, installing a Redriver plug-in in a database instance of a database management system (MySQL); S2, starting a Redriver plug-in, and creating an environment required by the plug-in; S3, capturing an original structured query language (sql), and setting a timing task of a task scheduler (Event), wherein the Event can store a result set of an original structured query language (sql) into a newly built table; S4, writing a rewriting rule, andadding the rewriting rule into the 'rewrite_rules' table; S5, loading the rewriting rule into the memory from the 'rewrite_rules' table by calling a 'flash_rewrite_rules () function, and enabling therewriting rule to take effect; S6, realizing quick query of the cache according to the Redriver and the Event. The method can adapt to a high-concurrency environment, and quick query is realized.

Description

technical field [0001] The invention relates to the field of MySQL database query, in particular to a Rewriter-based query optimization method for MySQL database. Background technique [0002] In today's era of big data, fast query of data is particularly important. The most commonly used one is a single structured query language (sql). SQL can satisfy the query of data when the amount of table data is very large but the system resources have not reached the bottleneck. However, as multiple processes are executed at the same time, the concurrency increases. The resource utilization rate of the system increases rapidly, and at this time, the execution efficiency of a single structured query language (sql) decreases. In order to cope with the data query under the condition of multi-process, currently proposed improvement methods mainly include two kinds, one is an optimization method based on structured query language (sql) rewriting, this method is usually by rewriting struc...

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 Applications(China)
IPC IPC(8): G06F16/2453G06F16/242
CPCG06F16/24534G06F16/2433Y02D10/00
Inventor 高湍湍顾湘余韩晟
Owner HANGZHOU QUWEI SCI & TECH
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