Supercharge Your Innovation With Domain-Expert AI Agents!

SQL optimization system and automatic SQL optimization method

An optimization method, a technology to demonstrate the system

Inactive Publication Date: 2018-09-28
SICHUAN CHANGHONG ELECTRIC CO LTD
View PDF3 Cites 7 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] (1) Low optimization efficiency: There are tens of thousands of SQL statements and hundreds of thousands of database tables in a project, and the efficiency is very slow through manual analysis and optimization one by one;
[0004] (2) Code maintenance is difficult: the developers who design the database, write SQL, and optimize SQL are different. Even with complete documentation, it is difficult for newcomers to take over the maintenance;
[0005] (3) Optimization is inflexible: any modification of the database framework must be re-optimized, and this process is often very long;
[0006] (4) The stability is not high: it is easy for people to neglect problems when optimizing one by one

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 optimization system and automatic SQL optimization method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0025] Such as figure 1 As shown, an automatic SQL optimization system mainly includes an XML scanning module, a database index adding module and an optimizing SQL statement module.

[0026] Among them, the XML scanning module mainly scans the XML file of SQL to check out SQL performance defects. The adding database indexing module mainly adds indexes to the database to optimize query speed, and the optimizing SQL statement module mainly modifies non-standard SQL statements so that all indexes can be performed normally. .

[0027] Specifically, during work, the XML scanning module first imports the XML file of SQL into the XML scanning module, and the XML scanning module scans all SQL statements; the XML scanning module performs a performance test on each SQL statement, and records the performance time.

[0028] In this embodiment, the qualified performance time standard is pre-stored in the XML scanning module, and when the XML scanning module tests the time performance of S...

Embodiment 2

[0032] An automatic SQL optimization method, based on the above-mentioned automatic SQL optimization system, mainly utilizes the XML scanning method to automatically optimize SQL, and its implementation method includes the following steps:

[0033] Step 1. The XML scanning module automatically scans all SQL, and tests the running performance of SQL, and extracts the SQL with poor performance;

[0034] Step 2. Add a database index module to optimize the index of the SQL extracted in step 1, add an index to its table and test the SQL performance, and extract the SQL with poor performance;

[0035] Step 3, optimize the SQL statement module to modify the SQL statement extracted in step 2, and modify the statement that makes the index effective, thereby improving SQL performance;

[0036] Step 4: Optimize the SQL statement module to display system optimization information, specifically display the number of modified SQL statements and the number of added indexes, and display the pe...

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 an SQL optimization system. The system comprises an XML scanning module, a database index addition module and an SQL statement optimization module; the database index additionmodule is connected with the XML scanning module and the SQL statement optimization module; the XML scanning module is used for scanning SQL statements in XML, testing time performance of the SQL statements and extracting the SQL statements with the performance not reaching the standard; the database index addition module is connected with related databases, adds database indexes for the SQL statements with the time performance not reaching the standard, tests the time performance of the SQL statements added with the database indexes again and records the SQL statements still not reaching thestandard; and the SQL statement optimization module is used for performing SQL specification modification on the SQL statements still not reaching the standard and recorded by the database index addition module to enable the indexes to take effect, and displaying optimized database information. The SQL optimization system uses an XML automatic scanning method, so that effective automatic optimization of database design and the sql statements is realized and quick optimization is realized.

Description

technical field [0001] The invention relates to the technical field of SQL optimization, in particular to an SQL optimization system and an automatic SQL optimization method. Background technique [0002] Traditional SQL optimization requires specific developers to view SQL statements one by one, analyze whether the SQL statement is reasonable, and analyze whether the database performance design is up to standard. It has obvious shortcomings such as: [0003] (1) Low optimization efficiency: There are tens of thousands of SQL statements and hundreds of thousands of database tables in a project, and the efficiency is very slow through manual analysis and optimization one by one; [0004] (2) Code maintenance is difficult: the developers who design the database, write SQL, and optimize SQL are different. Even with complete documentation, it is difficult for newcomers to take over the maintenance; [0005] (3) Optimization is inflexible: any modification of the database framew...

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
Inventor 王益
Owner SICHUAN CHANGHONG ELECTRIC 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