Supercharge Your Innovation With Domain-Expert AI Agents!

Method for high-risk query SQL based on database middleware

A database and middleware technology, applied in the direction of electronic digital data processing, digital data information retrieval, special data processing applications, etc., can solve the problems of database downtime, large database, and poor management of attacks, etc., to achieve Effect of durability, guaranteed stability, and protective performance

Pending Publication Date: 2022-07-05
浙江网筑信息技术服务有限公司
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] The main function of the existing database middleware is to realize read-write separation, sub-database sub-table, high availability and other functions, but the high-risk query SQL generated by the business system does not have a good management effect on the database.
In the current era of 5G, AI artificial intelligence, and big data, high-concurrency scenarios put great pressure on the database. If the database middleware can only manage the business data layer, it is not enough at all
On the one hand, high-risk query SQL will cause the database to go down, which will cause the business system to be unresponsive, and will eventually have a great negative impact on these Internet companies

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
  • Method for high-risk query SQL based on database middleware
  • Method for high-risk query SQL based on database middleware

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0031] like Figure 1-2 As shown in the figure, this embodiment provides a method for high-risk query SQL based on database middleware. The main purpose of the method is to strengthen the function of database middleware, which can perform statistics, analysis, and optimization management on high-risk query SQL, so as to improve the company database Protect and improve the stability of the company's business systems, specifically, including the following steps:

[0032] S1. The middleware receives the query SQL sent by the business program, and judges whether the query SQL is a slow SQL query;

[0033] The time threshold of slow SQL is set in the middleware in advance. When the execution time of the query SQL sent by the business program is longer than this value, it is judged as a slow query;

[0034] S2. Count slow SQL queries and cache records;

[0035] Mainly to count the execution times, average execution time, query conditions and associated data tables of the slow SQL ...

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 method for high-risk query SQL based on database middleware, and the method specifically comprises the steps: S1, receiving a query SQL sent by a business program through the middleware, and judging whether the query SQL is a slow SQL query or not; s2, counting the slow SQL query, and caching and recording the slow SQL query; s3, requesting to obtain an execution plan of the slow SQL query, and analyzing the condition whether the index exists in the execution plan or not; s4, analyzing a query condition of the slow SQL, and optimizing the slow SQL query; according to the method, manual participation of development or operation and maintenance personnel in optimization is not needed, each step is automatically realized, each optimization has a data basis, and problem SQL playback verification is carried out after optimization is completed. And for some SQL which cannot be optimized by adding indexes according to business needs, the method also performs management and control, on one hand, the concurrent quantity of the SQL with the problem is limited, and on the other hand, the SQL with the problem is forwarded to the slave database of the database, so that the stability of the master database of the database is protected, and the durability of the business system is realized.

Description

Technical field [0001] The invention relates to the technical field of database middleware, and is specifically a method for querying high-risk SQL based on database middleware. Background technique [0002] The main function of the existing database middleware is to realize functions such as separation of reading and writing, sub-database and sub-table, high availability, etc. However, it does not have a good management effect on the database attacks caused by high-risk query SQL generated by the business system. In the current era of 5G, AI, and big data, high concurrency scenarios put great pressure on databases. If database middleware can only manage the business data layer, it is completely insufficient. On the one hand, high-risk query SQL will cause database downtime, causing the business system to be unable to respond to use, and will ultimately have a huge negative impact on these Internet companies. We often see a certain Internet company's website or APP go down ...

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/2455
CPCG06F16/24561G06F16/2453
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