Database system optimization method and device

A system optimization and database technology, applied in the database field, can solve problems such as low optimization efficiency, inability to accurately locate SQL statements, and inability to improve the response speed of the application system, so as to achieve the effect of improving optimization efficiency and response speed

CN107688589AActive Publication Date: 2018-02-13PING AN TECH (SHENZHEN) CO LTD
7 Cites 7 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Publication Date
2018-02-13

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

The invention relates to a database system optimization method and device. The database system optimization method includes the steps: snap-shooting performance data of SQL (structured query language)statements of a database system every preset first time, arranging snapshots according to a time sequence, and saving the arranged snapshots; correspondingly performing variance calculation on performance data of a current snapshot and performance data of a snapshot of front sequence, and calculating total cache read data quantity and single average cache read data execution quantity corresponding to each SQL statement within the preset first time; acquiring the sum of number valves of the total cache read data quantity and the single average cache read data execution quantity of each SQL statement, and selecting SQL statements to be optimized based on the sum of the number valves. The performance data comprises execution times and cache read data quantity. According to the method, the SQL statements needing to be optimized can be accurately positioned, and optimizing efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The invention relates to the technical field of databases, in particular to a method and device for optimizing a database system. Background technique

[0002] Database query SQL (Structured Query Language, Structured Query Language) statements have various writing methods, and different writing methods of SQL statements are related to the performance of the application system. In the initial stage of application system development, the data in the database is relatively small, and SQL statements written in different ways have little impact on the application system. In practical applications, the data in the database will continue to increase, and the response speed of the application system will be greatly affected. Therefore, SQL statements need to be optimized in order to optimize the application system.

[0003] At present, when a DBA (Database Administrator, database administrator) faces a large number of SQL statements, he usually manually sele...

Examples

Embodiment Construction

[0043] The principles and features of the present invention are described below in conjunction with the accompanying drawings, and the examples given are only used to explain the present invention, and are not intended to limit the scope of the present invention.

[0044] Such as figure 1 as shown, figure 1 It is a schematic flow chart of an embodiment of the method for optimizing the database system of the present invention, the method for optimizing the database system includes the following steps:

[0045] Step S1, taking a snapshot of the performance data of each SQL statement of the database system every preset first time, and arranging and saving the snapshots in chronological order;

[0046] In this embodiment, a SQL statement optimization system can be used to optimize the database system. Take a snapshot (i.e. snapshot) of the performance data of each SQL statement of the database system every preset first time, for example, take a snapshot of the performance data o...