Unlock instant, AI-driven research and patent intelligence for your innovation.

SQL (structured query language) statement processing method and device

A processing method and statement technology, applied in the database field, can solve problems such as low database performance

Active Publication Date: 2014-06-18
新浪技术(中国)有限公司
View PDF3 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] The embodiment of the present invention provides a SQL statement processing method and device to solve the problem of low database operation performance existing in the prior art

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
  • SQL (structured query language) statement processing method and device
  • SQL (structured query language) statement processing method and device
  • SQL (structured query language) statement processing method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0034] figure 2 Shown is a flow chart of the SQL statement processing method provided by Embodiment 1 of the present invention, which specifically includes the following processing steps:

[0035] Step 201 , acquiring an SQL statement requesting a database processing operation.

[0036] The SQL statement may be an SQL statement sent by the application client to the database system for requesting database processing operations. In Embodiment 1 of the present invention, before the SQL statement reaches the database system and performs corresponding processing operations according to the SQL statement, The SQL statement can be obtained first, and processed according to the subsequent processing flow to determine whether the SQL statement will cause a large increase in the load of the database system, thereby determining whether to perform database processing operations according to the SQL statement.

[0037] Wherein, the database system may be a distributed database cluster of...

Embodiment 2

[0099] image 3 Shown is a flow chart of the SQL statement processing method provided by Embodiment 2 of the present invention, which specifically includes the following processing steps:

[0100] Step 301-step 306, respectively and above-mentioned figure 2 Steps 201 to 206 in the flow shown are the same and will not be described in detail here.

[0101]Step 307, determine whether the SQL statement includes the restriction parameter, and whether the SQL statement includes the outer ordering parameter, if the SQL statement includes the restriction parameter, and does not include the outer ordering parameter, enter step 303, otherwise, the SQL statement When the restriction parameter is not included in , or the outer ranking parameter is included, or the restriction parameter is not included and the outer ranking parameter is included, go to step 308 .

[0102] Step 308, with the above figure 2 Step 207 in the flow shown is the same.

[0103] Step 309, with the above fig...

Embodiment 3

[0112] Based on the same inventive concept, according to the SQL statement processing method provided by the above-mentioned embodiments of the present invention, correspondingly, Embodiment 3 of the present invention also provides a SQL statement processing device, and its structural diagram is as follows Figure 4 shown, including:

[0113] An acquisition unit 401, configured to acquire an SQL statement requesting a database processing operation;

[0114] An analyzing unit 402, configured to analyze the structure of the SQL statement to obtain an analysis result;

[0115] The first determination unit 403 is configured to determine, according to the analysis results, the number of reference rows represented when performing database processing operations according to the SQL statement, the reference number of rows being the number of data rows that need to be queried when performing database processing operations;

[0116] The second determining unit 404 is configured to dete...

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 SQL (structured query language) statement processing method and device. The method includes: acquiring a SQL statement demanding for database processing; structurally analyzing the SQL statement to obtain an analysis result; according to the analysis result, determining a represented reference line number when database processing is performed according to the SQL statement, the reference line number being a data line number to be queried when database processing is performed; and when the determined reference line number is smaller than a line number threshold, determining the database processing performed according to the SQL statement, and if larger, cancelling the database processing performed according to the SQL. Operating performance of a database is improved by the use of the method and device.

Description

technical field [0001] The invention relates to the technical field of databases, in particular to a SQL statement processing method and device. Background technique [0002] MySQL is a relational database management system, and the SQL (Structured Query Language) used by it is the most commonly used standardized language for accessing databases. [0003] In the existing MySQL technology, MySQL Proxy is an application between the client and the MySQL server. As a middle-level agent, it is responsible for forwarding the connection request of the front-end application client to the background database, and through the use of lua script , can implement complex connection control and filtering, so as to achieve read-write separation and load balancing. For application clients, MySQL Proxy is completely transparent, and application clients only need to connect to the listening port of MySQL Proxy. [0004] With the need for massive data storage and query, the distributed databa...

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): G06F17/30
Inventor 丛磊王利俊郑志勇
Owner 新浪技术(中国)有限公司