Database intelligent tuning method and system and terminal equipment
By automatically discovering and collecting enhanced statistics and execution plan change information on database performance issues, intelligent database tuning is achieved. This solves the problems of limited statistical scenarios and the inability to detect execution plan changes in existing technologies, reduces database operation risks, and improves execution plan efficiency.
Patent Information
- Application Number
- CN202511007398.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-22
- Publication Date
- 2025-11-21
AI Technical Summary
The existing database only collects statistical information from tables whose data changes by more than 10% in the early morning. This results in a single statistical scenario, an inability to customize statistical information objects for different databases, an inability to detect and quickly warn of changes in execution plans, and an inability to automatically bind better execution plans. Consequently, the database operates at high risk and the execution of SQL is inefficient.
By obtaining general rules based on historical change information, it automatically discovers and collects enhanced statistical information that may cause database performance problems, obtains execution plan change information, automatically binds to a better target execution plan, and monitors concurrent query information in real time to issue early warnings and alerts, thereby realizing the automated binding and optimization of execution plans.
It enables customized statistical information objects for different databases, timely detection of execution plan changes, automatic binding of better execution plans, reduction of database operation risks, improvement of execution plan efficiency, and ensure of business continuity.
Smart Images

Figure CN120994634A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of database intelligent optimization, and in particular to a database intelligent optimization method, system and terminal device. BACKGROUND
[0002] The existing database adopts an intelligent statistical information maintenance strategy, and automatically triggers a collection task in the early morning during a system load valley. The mechanism monitors table data changes in real time through a built-in change tracking module, and only starts a statistical information update process for a table whose data volume fluctuation exceeds a 10% threshold, effectively balancing resource consumption and data accuracy. Since the database lacks adaptive adjustment and automatic binding capture functions of execution plans, it needs to rely on periodic statistical information refresh to maintain the optimizer's awareness of data distribution. The maintenance window avoids the overhead of full library scanning by dynamically calculating the degree of table modification, while ensuring that the execution plan is generated based on the latest statistical metadata, preventing query performance degradation due to data skew, and establishing a controllable statistical information update cycle while ensuring performance during business peak periods.
[0003] However, in the prior art, the statistical information in the early morning is only collected for tables whose data changes exceed 10%, and the time is relatively fixed, which cannot well meet the needs of actual situations. Moreover, the database itself does not have the functions of discovering execution plan changes and automatically binding execution plans, and therefore there is an urgent need to provide a database optimization method to reduce data operation risks, improve execution SQL efficiency, and solve the problems of single statistical scenario, inability to customize statistical information objects for different databases, inability to discover and quickly warn of execution plan changes, and inability to automatically bind more optimal execution plans. SUMMARY
[0004] The present application provides a database intelligent optimization method, which can solve the problems of single statistical scenario, inability to customize statistical information objects for different databases, inability to discover and quickly warn of execution plan changes, and inability to automatically bind more optimal execution plans in the prior art, and achieve intelligent optimization of the database, reduce data operation risks, and improve the efficiency of execution plans.
[0005] The present application provides a database intelligent optimization method, which includes:
[0006] Based on the historical change information, a general rule is obtained to obtain enhanced statistical information based on the general rule;
[0007] Based on the enhanced statistical information, the current database is updated;
[0008] The execution plan change information is acquired to acquire a target execution plan based on the current database and the execution plan change information, and a binding change instruction is triggered based on the target execution plan, and then a binding tuning action is performed on the current database based on the binding change instruction and the target execution plan.
[0009] The database intelligent tuning method provided by the application can automatically discover and collect enhanced statistical information that may cause database performance problems based on historical change information, and automatically perform execution plan binding change on execution plan change based on acquired execution plan change information, so as to realize customized statistical information object for different databases, timely discovery of execution plan change, acquisition of required optimal target execution plan, automatic triggering of binding change instruction for automatic tuning of the current database, reduction of database operation risk, improvement of execution plan efficiency, and intelligent tuning of the database.
[0010] Further, the general rule is acquired based on the historical change information, and the enhanced statistical information is acquired based on the general rule, including: acquiring statistical information problems based on the historical change information; acquiring the general rule based on the statistical information problems meeting the preset general condition; and acquiring the enhanced statistical information based on the general rule.
[0011] In the above scheme, the database objects that are easy to cause database performance problems are automatically discovered and collected in actual operation, historical data is analyzed and sorted to discover and count problems causing execution plan change, and general rules are formed to automatically collect corresponding enhanced statistical information, so as to realize the purpose of stable execution plan through statistical information enhancement and reduce the risk of database performance.
[0012] Further, the execution plan change information is acquired to acquire a target execution plan based on the current database and the execution plan change information, and a binding change instruction is triggered based on the target execution plan, and then a binding tuning action is performed on the current database based on the binding change instruction and the target execution plan, including: acquiring the execution plan change information, acquiring the current execution plan and the current query statement bound by the current execution plan based on the execution plan change information; acquiring historical execution data based on the current query statement and the current database; determining whether there is a more optimal execution plan in the historical execution data based on the historical execution data and the current execution plan, and if so, taking the more optimal execution plan as the target execution plan and triggering the binding change instruction based on the more optimal execution plan; and performing the binding tuning action based on the binding change instruction and the target execution plan: based on the binding change instruction, the current execution plan is unbound from the current query statement, and the target execution plan is bound to the current query statement.
[0013] Further, the execution plan change information is acquired to acquire a target execution plan based on the current database and the execution plan change information, and trigger a binding change instruction based on the target execution plan, and further execute a binding tuning action on the current database based on the binding change instruction and the target execution plan, and the binding tuning action is not executed when it is determined that there is no better execution plan in the historical execution data based on the historical execution data and the current execution plan.
[0014] In the above scheme, the execution plan change information is acquired by monitoring the change of the execution plan, and when the execution plan changes, it is automatically determined whether there is a better execution plan in history, and the binding is released and the better binding is performed, so that the problem is found and handled in advance before the business exception occurs, the business is guaranteed to be affected as much as possible, the execution efficiency is improved, and the execution plan automatic binding database tuning is realized.
[0015] Further, the execution plan performance information corresponding to any query statement in the current database is acquired in real time, and if the execution plan performance information corresponding to any execution query statement meets the preset unbinding condition, the corresponding execution plan bound by the execution query statement is unbound.
[0016] In the above scheme, the execution plan performance information corresponding to any query statement in the current database is acquired in real time, and the automatic monitoring and discovery of the execution plan deterioration and the corresponding unbinding step are realized, so as to reduce the database performance risk.
[0017] Further, the concurrent query information corresponding to any query statement in the current database is acquired in real time, and if the concurrent query information corresponding to any concurrent query statement meets the preset concurrency range, an alarm information is sent; the concurrent query statement is acquired based on the alarm information; the database evaluation result is acquired based on the concurrent query statement and the current database, and the updated execution plan is acquired based on the database evaluation result.
[0018] In the above scheme, the concurrent query information corresponding to any query statement in the current database is acquired in real time, and the execution plan deterioration is automatically prewarned and monitored and adjusted, so as to solve the problems that the execution plan change cannot be found and the rapid prewarning is not realized.
[0019] Further, the database evaluation result is acquired based on the concurrent query statement and the current database, and the updated execution plan is acquired based on the database evaluation result, including: performing database evaluation based on the concurrent query statement and the current database to acquire the database evaluation result; and when it is determined that there is a historical execution plan meeting the evaluation condition based on the database evaluation result, the historical execution plan is taken as the updated execution plan.
[0020] Further, based on the concurrent query statement and the current database, a database evaluation result is obtained, and based on the database evaluation result, an update execution plan is obtained, and the method further comprises: based on the database evaluation result, when it is determined that there is no historical execution plan that meets the evaluation condition, an update execution plan is obtained based on the concurrent query statement.
[0021] In the above scheme, when it is confirmed that the concurrent query statement meets the preset concurrency range, the historical execution plan of the alarm concurrent query statement is evaluated to confirm whether there is a historical better execution plan, and when there is, the historical better execution plan is used as an update execution plan, and when there is not, a better update execution plan is obtained based on the statement, so that the situation of the deterioration of the execution plan is automatically warned and the intelligent optimization of the database is realized.
[0022] The database intelligent optimization method provided by the application can automatically discover and collect database objects that are prone to cause database performance problems, automatically perform execution plan binding and give a pre-warning in the case of deterioration of the execution plan, realize database automatic optimization based on statistical information enhancement and execution plan automatic binding, and stabilize and strengthen the execution plan of the database, thereby reducing the risk and influence of the deterioration of the execution plan.
[0023] The application provides a database intelligent optimization system, which realizes the above-mentioned database intelligent optimization method, and comprises a statistical enhancement module and an execution plan binding module, wherein:
[0024] The statistical enhancement module is used for obtaining a general rule based on historical change information, obtaining enhanced statistical information based on the general rule, and obtaining a current database based on the enhanced statistical information.
[0025] The execution plan binding module is used for obtaining execution plan change information, obtaining a target execution plan based on the current database and the execution plan change information, triggering a binding change instruction based on the target execution plan, and performing a binding optimization action on the current database based on the binding change instruction and the target execution plan.
[0026] The database intelligent optimization system provided by the application can automatically discover and collect enhanced statistical information that is prone to cause database performance problems through the statistical enhancement module detecting historical change information, and can automatically perform execution plan binding and change in the case of deterioration of the execution plan through the execution plan binding module obtaining execution plan change information, so that statistical information objects are customized for different databases, execution plan changes are discovered in a timely manner, a better target execution plan is obtained, a binding change instruction is automatically triggered to automatically optimize the current database, the risk of database operation is reduced, the efficiency of the execution plan is improved, and the intelligent optimization of the database is realized.
[0027] The application further provides a terminal device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and when the computer program is executed by the processor, the database intelligent optimization method is realized. BRIEF DESCRIPTION OF DRAWINGS
[0028] In order to more clearly illustrate the technical solutions of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. Obviously, the drawings described in the following are only some of the embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.
[0029] Figure 1 is a database intelligent optimization method provided by the present embodiment;
[0030] Figure 2 is a database intelligent optimization management method provided by the present embodiment. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical scheme and advantages of the present application clearer, the technical scheme of the present application will be described clearly and completely in the following with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0032] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "include" and "have" and any variations thereof in the specification and claims of the present application and the above description of drawings are intended to cover non-exclusive inclusion.
[0033] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "a plurality of" is two or more, unless otherwise explicitly specified.
[0034] Reference to an "embodiment" in this document means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are they necessarily mutually exclusive of one another. As will be apparent to those of ordinary skill in the art, embodiments described herein can be combined with other embodiments.
[0035] In the description of the embodiments of the application, the term "and / or" is merely an association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent the three cases of A alone, A and B together, and B alone. In addition, the character " / " in this paper generally represents that the front and rear associated objects are a "or" relationship.
[0036] In the description of the embodiments of the application, the term "a plurality of" refers to two or more (including two), and similarly, "a plurality of groups" refers to two or more groups (including two groups), and "a plurality of pieces" refers to two or more pieces (including two pieces).
[0037] In the description of the embodiments of the application, unless otherwise explicitly specified and limited, the technical terms "mounting", "connection", "connection", "fixing" and the like should be understood in a broad sense, for example, it can be fixedly connected, or it can be detachably connected, or it can be integrated; it can be mechanical connection, or it can be electrical connection; it can be directly connected, or it can be indirectly connected through an intermediate medium; it can be the internal communication of two elements or the interaction relationship between two elements. For those skilled in the art, the specific meaning of the above terms in the embodiments of the application can be understood according to the specific circumstances.
[0038] Reference Figure 1 To solve the problems of single statistical scene, inability to customize statistical information objects for different databases, inability to discover and quickly warn of execution plan changes, and inability to automatically bind a better execution plan in the prior art, realize intelligent optimization of the database, reduce data operation risk, and improve the efficiency of the execution plan, an embodiment of the application provides a database intelligent optimization method, which comprises the following steps:
[0039] S01, acquiring a general rule based on historical change information, to acquire enhanced statistical information based on the general rule;
[0040] S02, updating a current database based on the enhanced statistical information;
[0041] S03, acquiring execution plan change information, to acquire a target execution plan based on the current database and the execution plan change information, triggering a binding change instruction based on the target execution plan, and performing a binding optimization action on the current database based on the binding change instruction and the target execution plan.
[0042] The database intelligent optimization method provided by the embodiment automatically discovers and collects enhanced statistical information that may cause database performance problems through detecting historical change information, and automatically changes the execution plan binding through obtaining detection execution plan change information, so as to realize customizing statistical information objects for different databases, timely discovering execution plan changes, obtaining more optimal target execution plans, and automatically triggering binding change instructions to automatically optimize the current database, reduce database operation risks, improve the efficiency of execution plans, and realize intelligent optimization of the database.
[0043] Optionally, the step S01 comprises: obtaining a statistical information problem based on the historical change information; obtaining a general rule based on the statistical information problem meeting a preset general condition; and obtaining enhanced statistical information based on the general rule.
[0044] In the specific implementation process, through daily statement optimization, SQL execution plan changes caused by statistical information problems are analyzed and sorted out to form a general rule. For tables meeting the general rule, the configured task automatically discovers and adds them as tables to be collected, and the statistical information of these tables is automatically collected in the statistical collection enhancement function to achieve the purpose of stabilizing the SQL execution plan. The execution is performed in the non-business period in the early morning as a supplement to the default statistical information task of the system. The specific functions include the following aspects: enhanced statistical collection is performed on tables that may have predicate boundary violations; enhanced statistical collection is performed on tables with inconsistent statistics information of the possible table and partition; enhanced statistical collection is performed on tables with num_rows of 0 and loaded data; and enhanced statistical collection is performed on tables with time fields containing indexes.
[0045] In the actual production operation, the process continues. When it is found that a certain type of statistical information problem causes many performance problems, the database is evaluated to confirm whether the problem is generally present. After confirming the universality, a general rule is formed, such as: a certain business system will clean up the table data every night and batch import data at 8 am every morning, so the database automatically records the number of table statistics information as 0, but there is a large amount of data in the actual table. When this problem is found, the problem is first evaluated to confirm whether it also exists in other systems. For this situation, the general rule "num_rows of 0 and tables with loaded data" is sorted out. After evaluating that the problem is generally present and a general rule can be formed, the statistical information collection task of the table meeting the "num_rows of 0 and tables with loaded data" rule is increased in the statistical information enhancement.
[0046] Optionally, the step S03 comprises: obtaining the execution plan change information, obtaining the current execution plan and the current query statement bound by the current execution plan based on the execution plan change information; obtaining the historical execution data based on the current query statement and the current database; determining whether there is a better execution plan in the historical execution data based on the historical execution data and the current execution plan; if there is a better execution plan, taking the better execution plan as the target execution plan, and triggering the binding change instruction based on the better execution plan; and executing the binding optimization action based on the binding change instruction and the target execution plan: based on the binding change instruction, unbinding the current execution plan from the current query statement, and binding the target execution plan to the current query statement.
[0047] Optionally, the step S03 further comprises: if there is no better execution plan in the historical execution data based on the historical execution data and the current execution plan, then no binding optimization action needs to be executed.
[0048] In the implementation process, generally, the advantages and disadvantages of the execution plan are mainly evaluated and judged according to the execution time of the statement. The execution plan with shorter execution time in the same statement is considered to be a better execution plan.
[0049] Optionally, the execution plan performance information corresponding to any query statement in the current database is obtained in real time. If the execution plan performance information corresponding to any execution query statement meets the preset unbinding condition, the corresponding execution plan bound by the execution query statement is unbound.
[0050] In the implementation process, by obtaining the execution plan performance information corresponding to any query statement in the current database in real time, automatic monitoring and discovery of the situation where the execution plan deteriorates and the corresponding unbinding step are realized, and the database performance risk is reduced.
[0051] Optionally, the concurrent query information corresponding to any query statement in the current database is obtained in real time. If the concurrent query information corresponding to any concurrent query statement meets the preset concurrency range, an alarm information is issued; the concurrent query statement is obtained based on the alarm information; the database evaluation result is obtained based on the concurrent query statement and the current database, and the updated execution plan is obtained based on the database evaluation result.
[0052] In the implementation process, by obtaining the concurrent query information corresponding to any query statement in the current database in real time, the situation where the execution plan deteriorates is automatically prewarned and monitored and adjusted, and the problems that the execution plan change cannot be discovered and quickly prewarned are solved.
[0053] Optionally, the database evaluation result is obtained based on the concurrent query statement and the current database, and the updated execution plan is obtained based on the database evaluation result, including: performing database evaluation based on the concurrent query statement and the current database to obtain a database evaluation result; and when it is determined based on the database evaluation result that there is a historical execution plan that meets the evaluation condition, taking the historical execution plan as the updated execution plan.
[0054] Optionally, the database evaluation result is obtained based on the concurrent query statement and the current database, and the updated execution plan is obtained based on the database evaluation result, and the method further includes: when it is determined based on the database evaluation result that there is no historical execution plan that meets the evaluation condition, obtaining the updated execution plan based on the concurrent query statement.
[0055] In the implementation process, the above process realizes the execution plan binding function, which is mainly used for database runtime, monitors the change of the execution plan corresponding to the SQL statement (query statement), and if the execution plan changes, automatically determines whether there is a better execution plan in history, provides a suggestion for the DBA (database) to evaluate whether the execution plan needs to be bound, that is, finds out the SQL statement that meets the rules, and if there is a better execution plan, automatically binds the SQL statement. Through this function, problems can be found and handled in advance before the business appears abnormally, and the business is guaranteed as much as possible. The specific functions include the following aspects: periodically finding better execution plans in the current and history at non-business time in the early morning, and automatically binding if there is a better execution plan; periodically monitoring the bound execution plan in the whole time period, and automatically unbinding when the performance decreases after binding; monitoring a certain number of active sessions in the whole time period, and if the number of SQLid (SQL statement) executions at the same time exceeds 20, an alarm is given to remind the DBA to evaluate.
[0056] In the implementation process, the specific process of DBA evaluation is: after receiving the alarm, logging in to the database to check whether the database indeed has the number of SQLid executions exceeding 20 (preset concurrency range); checking the historical execution plan of the statement through the SQLid to confirm whether there is a historical better execution plan; if there is no better execution plan, the statement needs to be analyzed to evaluate whether there is an optimization scheme for the statement to determine the updated execution plan.
[0057] The database intelligent optimization method provided in the embodiment automatically discovers and collects database objects that are easy to cause database performance problems, automatically performs execution plan binding and early warning for the case of execution plan deterioration, realizes database automatic optimization based on statistical information enhancement and execution plan automatic binding, and stably strengthens the execution plan of the database, and reduces the risk and influence of execution plan deterioration.
[0058] Embodiment two:
[0059] Referring to Figure 2 The embodiment provides a database intelligent tuning management method, which is implemented by using the database intelligent tuning method.
[0060] S1, statistical information enhancement;
[0061] The step S1 comprises: S11, obtaining a statistical information problem based on historical change information; S12, obtaining a general rule based on the statistical information problem meeting a preset general condition; S13, obtaining enhanced statistical information based on the general rule; and S14, updating a current database based on the enhanced statistical information.
[0062] S2, execution plan binding;
[0063] The step S2 comprises:
[0064] S21, periodically judging the historical execution data to obtain a more optimal execution plan in a non-business time period, and triggering an execution binding tuning action based on the more optimal execution plan when the more optimal execution plan exists;
[0065] S22, periodically monitoring the bound execution plan in a whole time period, and determining to unbind the execution plan when any execution plan appears to have performance degradation after being bound;
[0066] S23, periodically monitoring concurrent query information corresponding to any query statement in the whole time period, and issuing an alarm information to remind a DBA to evaluate and perform the step S24 when the concurrent query information corresponding to any concurrent query statement meets a preset concurrency range.
[0067] S24, logging in a database to confirm the concurrent query statement corresponding to the alarm information, obtaining a historical execution plan corresponding to the concurrent query statement, and confirming whether there is a more optimal historical execution plan; if yes, performing the step S241, and if no, performing the step S242.
[0068] S241, unbinding the concurrent execution plan corresponding to the concurrent query statement, and binding the historical execution plan and the concurrent query statement.
[0069] S242, obtaining an updated execution plan based on the concurrent query statement, unbinding the concurrent execution plan corresponding to the concurrent query statement, and binding the updated execution plan and the concurrent query statement.
[0070] The embodiment provides a database intelligent optimization management method, which specifically comprises two functions of statistical information enhancement and execution plan binding, and performs stable enhancement on a sql execution plan of a database from two aspects of before and after database operation processing, reduces risks and influences of SQL execution plan deterioration, realizes automatic discovery and collection of database objects which are prone to cause database performance problems, automatic execution plan binding for execution plan deterioration, automatic early warning for execution plan deterioration, reduction of database performance risks, realization of database intelligent optimization, and provision of a database optimization management mode based on information enhancement and execution plan automatic binding.
[0071] Embodiment three:
[0072] The embodiment provides a database intelligent optimization system, realizes the database intelligent optimization method, and comprises a statistical enhancement module and an execution plan binding module.
[0073] The statistical enhancement module is used for acquiring general rules based on historical change information, acquiring enhanced statistical information based on the general rules, and acquiring a current database based on the enhanced statistical information.
[0074] The execution plan binding module is used for acquiring execution plan change information, acquiring a target execution plan based on the current database and the execution plan change information, triggering a binding change instruction based on the target execution plan, and performing a binding optimization action on the current database based on the binding change instruction and the target execution plan.
[0075] The database intelligent optimization system provided by the embodiment can automatically discover and collect enhanced statistical information which is prone to cause database performance problems through the statistical enhancement module based on historical change information, and can acquire detection execution plan change information through the execution plan binding module, automatically perform execution plan binding change on execution plan deterioration and the like, realize customization of statistical information objects for different databases, timely discovery of execution plan change, acquisition of a more optimal target execution plan, automatic triggering of a binding change instruction for automatic optimization of the current database, reduction of database operation risks, improvement of the efficiency of the execution plan, and realization of the intelligent optimization of the database.
[0076] On the basis of the embodiment of the database intelligent optimization method, another embodiment of the present application provides a terminal device, which comprises a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, the database intelligent optimization method is realized.
[0077] For example, in this embodiment, the computer program can be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present application. The one or more module elements can be a series of computer program instruction segments capable of completing a specific function, which are used to describe the execution process of the computer program in the terminal device.
[0078] The terminal device can be a desktop computer, a notebook computer, a palm computer, a cloud server and other computing devices. The terminal device can include, but is not limited to, a processor and a memory.
[0079] The processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc. The processor is the control center of the terminal device, and connects all parts of the terminal device through various interfaces and lines.
[0080] The above is the preferred embodiment of the present application. It should be pointed out that for those skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, which are also considered within the scope of protection of the present application.
Claims
1. A database intelligent tuning method, characterized in that, The method comprises the following steps: acquiring a general rule based on historical change information, and acquiring enhanced statistical information based on the general rule; updating a current database based on the enhanced statistical information; acquiring execution plan change information, acquiring a target execution plan based on the current database and the execution plan change information, triggering a binding change instruction based on the target execution plan, and performing a binding tuning action on the current database based on the binding change instruction and the target execution plan.
2. The method of claim 1, wherein, The method of acquiring a general rule based on historical change information, and acquiring enhanced statistical information based on the general rule comprises the following steps: acquiring statistical information problems based on historical change information; acquiring a general rule based on statistical information problems that meet preset general conditions; acquiring enhanced statistical information based on the general rule.
3. The method of claim 1, wherein, The method of acquiring execution plan change information, acquiring a target execution plan based on the current database and the execution plan change information, triggering a binding change instruction based on the target execution plan, and performing a binding tuning action on the current database based on the binding change instruction and the target execution plan comprises the following steps: acquiring execution plan change information, acquiring a current execution plan and a current query statement bound by the current execution plan based on the execution plan change information; acquiring historical execution data based on the current query statement and the current database; when it is determined that there is a better execution plan in the historical execution data based on the historical execution data and the current execution plan, taking the better execution plan as a target execution plan, and triggering a binding change instruction based on the better execution plan; performing a binding tuning action based on the binding change instruction and the target execution plan: unbinding the current execution plan from the current query statement based on the binding change instruction, and binding the target execution plan to the current query statement.
4. The method of claim 1, wherein, The method of acquiring execution plan change information, acquiring a target execution plan based on the current database and the execution plan change information, triggering a binding change instruction based on the target execution plan, and performing a binding tuning action on the current database based on the binding change instruction and the target execution plan further comprises the following steps: when it is determined that there is no better execution plan in the historical execution data based on the historical execution data and the current execution plan, no binding tuning action needs to be performed.
5. The method for intelligent database tuning as recited in claim 1, wherein, The method further comprises the following steps: acquiring execution plan performance information corresponding to any query statement in the current database in real time, and unbinding the corresponding execution plan bound by the execution query statement if the execution plan performance information corresponding to any execution query statement meets preset unbinding conditions.
6. The method of intelligent database tuning as recited in claim 1, wherein, The method further comprises the following steps: acquiring concurrent query information corresponding to any query statement in the current database in real time, and issuing an alarm information if the concurrent query information corresponding to any concurrent query statement meets preset concurrent ranges; acquiring a concurrent query statement based on the alarm information; acquiring a database evaluation result based on the concurrent query statement and the current database, and acquiring an updated execution plan based on the database evaluation result.
7. The method of intelligent database tuning as recited in claim 6, wherein, The database evaluation result is obtained based on the concurrent query statement and the current database, and an updated execution plan is obtained based on the database evaluation result. The database evaluation result is obtained based on the concurrent query statement and the current database. When it is determined that there is a historical execution plan meeting the evaluation condition based on the database evaluation result, the historical execution plan is taken as the updated execution plan.
8. The method of intelligent database tuning as recited in claim 7, wherein, The database evaluation result is obtained based on the concurrent query statement and the current database, and an updated execution plan is obtained based on the database evaluation result. When it is determined that there is no historical execution plan meeting the evaluation condition based on the database evaluation result, the updated execution plan is obtained based on the concurrent query statement.
9. A database intelligent tuning system, characterized by, The database intelligent optimization method according to any one of claims 1-8 comprises a statistical enhancement module and an execution plan binding module. The statistical enhancement module is configured to obtain a general rule based on historical change information, to obtain enhanced statistical information based on the general rule, and to obtain the current database based on the enhanced statistical information. The execution plan binding module is configured to obtain execution plan change information, to obtain a target execution plan based on the current database and the execution plan change information, to trigger a binding change instruction based on the target execution plan, and to perform a binding optimization action on the current database based on the binding change instruction and the target execution plan.
10. A terminal device, comprising: The database intelligent optimization method according to any one of claims 1-8 is implemented by a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor.