Supercharge Your Innovation With Domain-Expert AI Agents!

Database high-frequency SQL query method and system and storage medium

A query method and database technology, applied in the field of systems and storage media, and database high-frequency SQL query methods, can solve the problems of low efficiency of high-frequency SQL queries, reduce the time for repeated SQL parsing and regenerate result sets, and highlight the essence Sexual characteristics, stress-relieving effects

Active Publication Date: 2021-08-03
SHANDONG YINGXIN COMP TECH CO LTD
View PDF13 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] Aiming at the problem of low efficiency of high-frequency SQL query in existing databases, the present invention provides a method, system and storage medium for high-frequency SQL query in database, which will execute more frequently The SQL query result set is permanently saved, reducing the time for repeated SQL parsing and regenerating the result set, further optimizing the cached result set to improve query efficiency, and realizing hierarchical storage of the result set to relieve the pressure on memory space resources

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
  • Database high-frequency SQL query method and system and storage medium
  • Database high-frequency SQL query method and system and storage medium
  • Database high-frequency SQL query method and system and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0052] like Figures 1 to 3 As shown, the present embodiment provides a database high-frequency SQL query method, comprising the following steps:

[0053] S1: Grab SQL-related information in the database and create a storage table;

[0054] Said step S1 comprises the following steps:

[0055] Real-time scan in the database to obtain SQL-related information and record it; create a Job in the database, scan the SQL session view in real-time through the Job in the database view, obtain SQL-related information and put it into the information record table. The fields in the information record table are serial number, SQL ID, SQL execution plan, SQL start execution time, and SQL execution times. The number of SQL executions will increase by 1 for each SQL execution.

[0056] According to the execution frequency of SQL, SQL is divided into high-frequency SQL, intermediate-frequency SQL, medium-low-frequency SQL, and low-frequency SQL; the number of successful executions of SQL with...

Embodiment 2

[0074] like Figure 4 As shown, the present embodiment provides a database high-frequency SQL query system, including:

[0075] SQL Capture Module 1: Create the first stored procedure in the database, capture SQL-related information in real time, and create a storage table; create a Job to scan the SQL session view in real time to capture SQL-related information, and divide it into high-frequency and medium-frequency according to the SQL execution frequency , medium-low frequency, and low-frequency, create storage tables for high-frequency, medium-frequency, and medium-low-frequency SQL respectively.

[0076] Storage module 2: Create a trigger in the database to store the result set after SQL execution into the corresponding storage table, and the trigger updates the result set in real time and synchronizes the updated result set to the storage table;

[0077] Mapping module 3: create a second stored procedure in the database, establish a mapping relationship between the SQL ...

Embodiment 3

[0081] This embodiment provides a computer storage medium, where instructions are stored in the computer storage medium, and when the computer is run on the computer, the computer is made to execute the above method.

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 a database high-frequency SQL query method and system and a storage medium, and the method comprises the following steps: S1, capturing SQL related information in a database, and creating a storage table; S2, creating a trigger to store a result set after SQL execution into a corresponding storage table, updating the result set in real time by the trigger, and synchronizing the updated result set into the storage table; S3, establishing a mapping relation between the SQL ID and the storage table, and generating a mapping table; and S4, performing hierarchical storage on the result set data in the storage table. According to the method, the time for repeatedly analyzing the SQL and regenerating the result set is shortened, and the high-frequency SQL query efficiency of the database is effectively improved.

Description

technical field [0001] The invention belongs to the technical field of databases, and in particular relates to a database high-frequency SQL query method, system and storage medium. Background technique [0002] In the database, the result set after querying the table through SQL or querying multiple tables can be temporarily cached in the memory. However, with the increase of data in the memory, the memory cannot cache the result set indefinitely. By default, the result set that has not been used recently Result sets are squeezed out of memory. If you perform an associated query on this table or multiple tables again, you cannot get the result set from the memory, and you need to read the result set from the disk and then into the memory. Reading data from the disk is more efficient than reading it in memory The efficiency is much lower. If the query result set has a large amount of data, it may be very time-consuming and waste time. [0003] How to permanently save the ...

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): G06F16/242G06F16/2453G06F16/2455
CPCG06F16/2433G06F16/2453G06F16/24552Y02D10/00
Inventor 魏本帅杜彦魁
Owner SHANDONG YINGXIN COMP TECH CO LTD
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