Database operation statement processing method, storage medium, and device

By acquiring and processing index configuration information in database operation statements, an execution plan that meets expectations is generated, which solves the problem of execution plan deviation caused by business intervention in database operation statements, and improves the influence of index configuration statements and the operating efficiency of the database.

CN117331969BActive Publication Date: 2026-06-16CETC JINCANG (BEIJING) TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CETC JINCANG (BEIJING) TECH CO LTD
Filing Date
2023-10-17
Publication Date
2026-06-16

Smart Images

  • Figure CN117331969B_ABST
    Figure CN117331969B_ABST
Patent Text Reader

Abstract

The application provides a database operation statement processing method, a storage medium and equipment. The method comprises the following steps: acquiring index configuration information in a database operation statement; processing a generation path of an execution plan according to the index configuration information; and generating the execution plan according to the processed generation path. Through the method, the execution logic of the recommended index keyword and the specified index keyword is modified, the influence of the index configuration statement on path selection is further improved, and the generation of the execution plan is controlled, so that the database operation statement is executed in an expected manner.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of databases, and in particular to a method, storage medium, and device for processing database operation statements. Background Technology

[0002] With the increasing popularity of databases, the performance requirements for databases are becoming more and more demanding. Therefore, databases need to be optimized when executing database operation statements to obtain the optimal execution plan.

[0003] However, in actual production, business needs may lead to human intervention in the determination of the optimal execution plan, causing database operation statements to be executed in the expected way, such as using index. However, the effect is not strong, and the database operation statements are often still executed according to other execution plans, failing to achieve the intended purpose. Summary of the Invention

[0004] One object of this invention is to control the generation of execution plans.

[0005] A further objective of this invention is to enhance the impact of index configuration statements.

[0006] Specifically, the present invention provides a method for processing database operation statements, including:

[0007] Retrieve index configuration information from database operation statements;

[0008] The generation path of the execution plan is processed according to the index configuration information;

[0009] An execution plan is generated based on the processed output path.

[0010] Optionally, the steps for obtaining index configuration information from database operation statements include:

[0011] Retrieve database operation statements;

[0012] Determine whether the database operation statement contains the target keyword;

[0013] If so, extract the target keywords and their contained content as index configuration information.

[0014] Optionally, target keywords may include recommended index keywords;

[0015] The steps for processing the execution plan generation path based on the index configuration information include:

[0016] Determine whether the target keyword in the index configuration information is a recommended index keyword;

[0017] If so, then the index scan path in the generated path will be processed;

[0018] Add scanning cost to scan paths outside the index scan path in the generated path.

[0019] Optionally, the steps for processing the index scan path in the generated path include:

[0020] Record the index information in the database operation statements to a preset information table;

[0021] Retrieve the target index specified by the target keyword;

[0022] Delete indexes other than the target index in the preset information table.

[0023] Optionally, target keywords may include specified index keywords;

[0024] The steps for processing the execution plan generation path based on the index configuration information include:

[0025] Determine whether the target keyword in the index configuration information is the specified index keyword;

[0026] If so, then the index scan path in the generated path will be processed;

[0027] This adds scanning cost to scan paths outside the index scan path in the generated path;

[0028] Remove scan paths other than index scan paths and full table scan paths from the generated paths.

[0029] Optionally, the steps for processing the index scan path in the generated path include:

[0030] Record the index information in the database operation statements to a preset information table;

[0031] Retrieve the target index specified by the target keyword;

[0032] Delete indexes other than the target index in the preset information table.

[0033] Optionally, target keywords include ignored indexed keywords;

[0034] The steps for processing the execution plan generation path based on the index configuration information include:

[0035] Determine whether the target keyword in the index configuration information is an ignored index keyword;

[0036] If so, record the index information in the database operation statement to the preset information table;

[0037] Retrieve the target index specified by the target keyword;

[0038] Delete the target index from the preset information table.

[0039] Optionally, the step of generating an execution plan based on the processed generation path includes:

[0040] Calculate the cost of each generated path;

[0041] The paths are sorted according to cost, and the optimal generation path is selected as the execution plan.

[0042] Optionally, the step of obtaining the database operation statement may further include:

[0043] Calculate the selectivity of database operation statements;

[0044] Determine if the selection rate is greater than a preset threshold;

[0045] If so, then the execution plan will be a full table scan.

[0046] According to another aspect of the present invention, a machine-readable storage medium is also provided, on which a machine-executable program is stored, wherein the machine-executable program, when executed by a processor, implements the processing method of database operation statements as described above.

[0047] In this invention, the index configuration information in the database operation statement is first obtained; the generation path of the execution plan is processed according to the index configuration information; and the execution plan is generated according to the processed generation path. This method can influence the generation of the execution plan of the database operation statement based on the index configuration information, thereby controlling the generation of the execution plan and ensuring that the database operation statement is executed as intended.

[0048] Furthermore, in the solution of this invention, when the target keyword is a recommended index keyword, the index scan paths in the generated path are first processed, and then additional costs are added to scan paths other than the index scan paths in the generated path. This increases the strength of the recommended index keyword, causing the execution plan to execute according to the recommended index as much as possible. When the target keyword is a specified index keyword, the index scan paths in the generated path are first processed, and then additional costs are added to scan paths other than the index scan paths in the generated path. Subsequently, paths other than index scans and full table scans are deleted, thereby forcing the execution plan to execute according to the specified index. Through this method, the influence of index configuration statements on path selection is further improved, enabling database operation statements to be executed in the intended manner.

[0049] The above and other objects, advantages and features of the present invention will become more apparent to those skilled in the art from the following detailed description of specific embodiments of the invention in conjunction with the accompanying drawings. Attached Figure Description

[0050] The following sections will describe some specific embodiments of the invention in detail by way of example and not limitation, with reference to the accompanying drawings. The same reference numerals in the drawings denote the same or similar parts or portions. Those skilled in the art should understand that these drawings are not necessarily drawn to scale. In the drawings:

[0051] Figure 1 This is a flowchart illustrating a method for processing database operation statements according to an embodiment of the present invention;

[0052] Figure 2 This is a flowchart illustrating a method for processing database operation statements according to another embodiment of the present invention;

[0053] Figure 3 This is a flowchart illustrating a method for processing database operation statements according to another embodiment of the present invention;

[0054] Figure 4 This is a schematic diagram of a machine-readable storage medium in a database operation statement processing method according to an embodiment of the present invention; and

[0055] Figure 5 This is a schematic diagram of a computer device for processing database operation statements according to an embodiment of the present invention. Detailed Implementation

[0056] Those skilled in the art should understand that the embodiments described below are merely a part of the embodiments of the present invention, and not all of the embodiments of the present invention. These partial embodiments are intended to explain the technical principles of the present invention and are not intended to limit the scope of protection of the present invention. Based on the embodiments provided by the present invention, all other embodiments obtained by those skilled in the art without creative effort should still fall within the scope of protection of the present invention.

[0057] Figure 1 This is a flowchart illustrating a method for processing database operation statements according to an embodiment of the present invention. In some optional embodiments, this process may generally include:

[0058] Step S101: Obtain index configuration information from the database operation statement. In this embodiment, the database operation statement can be an SQL statement. After receiving the database operation statement, the database calculates the cost incurred by executing it through various paths based on its specific content. Finally, it determines the optimal path to execute the database operation statement based on the cost incurred, which is the optimization of the database operation statement. However, in actual production, business requirements may lead to human intervention in the determination of the optimal execution plan, causing the database operation statement to execute in the expected way. One possible approach is to add an index configuration statement to the database operation statement. When the database receives such a database operation statement, it will obtain the corresponding index configuration information through keyword recognition. An optional example of the index configuration information is the type of index configuration statement and its corresponding specific index. Those skilled in the art can determine the specific content of the index configuration information according to the actual situation.

[0059] Step S102: Process the execution plan generation path according to the index configuration information. In some optional embodiments, the processing of the execution plan generation path includes optional operations such as: processing the path specified by the index configuration information, and increasing the cost of other paths besides the specified path. The cost refers to a selection method used by the optimizer to determine the final selected path; by sorting the costs of each path, the optimal path is selected to generate the corresponding execution plan.

[0060] Step S103: Generate an execution plan based on the processed generation path.

[0061] This method increases the influence of index configuration statements on path selection, thereby controlling the generation of execution plans and ensuring that database operation statements are executed as intended.

[0062] In this embodiment, the step of obtaining index configuration information from a database operation statement generally includes: obtaining the database operation statement; determining whether the database operation statement contains a target keyword; and if so, extracting the target keyword and its contents as index configuration information. Some optional examples of target keywords include: use index (recommended index), force index (specified index), and ignore index (ignore index). Those skilled in the art can determine the specific type of target keyword based on the actual situation.

[0063] In some optional embodiments, the target keyword may include a recommended index keyword. The step of processing the execution plan generation path based on the index configuration information generally includes: determining whether the target keyword in the index configuration information is a recommended index keyword; if so, processing the index scan path in the generation path; and adding a cost to scan paths other than the index scan path in the generation path. The recommended index keyword may be "use index," which instructs the database to recommend generating the corresponding execution plan using the specific index specified by this keyword. In this embodiment, one way to operate on the recommended index keyword is: after processing the index scan path in the generation path, adding a cost to scan paths other than the index scan path in the generation path. This way, when the optimizer calculates the cost of each scan path, the cost of other paths is artificially increased, making the optimizer more inclined to use index scans, thereby achieving the purpose of recommending indexes.

[0064] In this embodiment, the steps for processing the index scan path in the generated path generally include: recording the index information in the database operation statement to a preset information table; obtaining the target index specified by the target keyword; and deleting indexes other than the target index from the preset information table. This method ensures that when the optimizer determines the execution path using an index scan, it can operate according to the specified index, thereby achieving the goal of recommending an index.

[0065] In some alternative embodiments, the target keyword may generally include a specified index keyword; the step of processing the execution plan generation path according to the index configuration information may generally include: determining whether the target keyword in the index configuration information is a specified index keyword; if so, processing the index scan path in the generation path; adding cost to scan paths other than the index scan path in the generation path; and deleting scan paths other than the index scan path and the full table scan path in the generation path. The specified index keyword may be `force index`, which instructs the database to specify the specific index specified by this keyword to generate the corresponding execution plan during the execution plan generation process. In this embodiment, one way to operate on the specified index keyword is: after processing the index scan path in the generation path and adding cost to scan paths other than the index scan path in the generation path, adding or deleting other scan paths other than the index scan path and the full table scan path. In this way, when the optimizer calculates the cost of each scan path subsequently, it will find that only index scan paths exist, thus achieving the purpose of specifying the index. Furthermore, the reason for initially increasing the cost of other scan paths and then deleting them is that during database execution, if the cost of other scan paths is not increased, the cost of index scan paths may become too high, leading to them being automatically ignored by the optimizer. Simultaneously, to ensure the normal operation of the database, at least one valid scan path needs to be retained. Since full table scans are always valid during database execution, deleting scan paths other than index scan paths and full table scan paths prevents database errors caused by index scan path failures.

[0066] In this embodiment, the steps for processing the index scan path in the generated path generally include: recording the index information in the database operation statement to a preset information table; obtaining the target index specified by the target keyword; and deleting indexes other than the target index from the preset information table. This method ensures that when the optimizer determines the execution path using an index scan, it can operate according to the specified index, thereby achieving the purpose of the specified index.

[0067] In some alternative embodiments, the target keyword includes an ignore index keyword. The steps of processing the execution plan generation path based on the index configuration information generally include: determining whether the target keyword in the index configuration information is an ignore index keyword; if so, recording the index information in the database operation statement to a preset information table; obtaining the target index specified by the target keyword; and deleting the target index from the preset information table. The ignore index keyword can be `ignore index`, which instructs the database to ignore the specific index specified by this keyword during the execution plan generation process. In this way, when the optimizer calculates the cost of each scan path subsequently, even if an index scan path is used, the specified index will be ignored, thus achieving the desired result.

[0068] In this embodiment, the step of generating an execution plan based on the processed generation path generally includes: calculating the cost consumed by each generation path; sorting the paths according to the cost and selecting the optimal generation path as the execution plan.

[0069] After obtaining the database operation statement, the process typically includes: calculating the selectivity of the database operation statement; determining whether the selectivity is greater than a preset threshold; and if so, directly determining the execution plan as a full table scan. The selectivity refers to the percentage of rows that meet the conditions in the query result set. One possible example of a preset threshold is 1. When the selectivity is greater than 1, it indicates that the database operation statement will operate on the entire table; therefore, a full table scan can be directly selected, thus saving database server resources.

[0070] This method modifies the execution logic of recommended and specified index keywords, further enhancing the influence of index configuration statements on path selection, thereby controlling the generation of execution plans and ensuring that database operation statements are executed as intended.

[0071] Figure 2 This is a flowchart illustrating a method for processing database operation statements according to another embodiment of the present invention. In some optional embodiments, this process generally includes:

[0072] Step S201: Obtain the database operation statements.

[0073] Step S202: Determine whether the selection rate is greater than a preset threshold. In this embodiment, the selection rate generally refers to the proportion of rows that meet the conditions in the query result set.

[0074] Step S203: If the determination in step S202 is yes, then the execution plan is determined to be a full table scan. In this embodiment, one possible example of the preset threshold is 1. When the selectivity is greater than 1, it means that the database operation statement will operate on the entire table. Therefore, the full table scan method can be directly selected, thereby saving database server resources.

[0075] Step S204: If the determination in step S202 is negative, determine whether the database operation statement contains the target keyword. In this embodiment, some optional examples of the target keyword are: use index (recommend index), force index (specify index), and ignore index (ignore index).

[0076] Step S205: If the determination in step S204 is yes, extract the target keyword and its contained content as index configuration information. In some optional embodiments, the target keyword is generally used in the form of use index(idx1,idx2), ignore index(idx1,idx3), and force index(idx2). Therefore, the target keyword and its contained content can be obtained as index configuration information based on such statements. Specifically, use index(idx1,idx2) instructs the database to recommend generating the corresponding execution plan using the specific indexes idx1 and idx2 specified by this keyword; force index(idx2) instructs the database to specify the specific index idx2 specified by this keyword in the execution plan generation process; and ignore index(idx1,idx3) instructs the database to ignore the specific indexes idx1 and idx3 specified by this keyword in the execution plan generation process.

[0077] Step S206: Determine the category of the target keyword in the index configuration information.

[0078] Step S207: Process the index scan paths in the generated path according to the target keyword category. In some optional embodiments, when the target keyword is a recommended index keyword, the processing steps generally include: recording the index information in the database operation statement to a preset information table; obtaining the target index specified by the target keyword; deleting indexes other than the target index in the preset information table, thus increasing the cost of scan paths other than the index scan paths in the generated path. In this way, when the optimizer calculates the cost of each scan path, the cost of other paths is artificially increased, making the optimizer more inclined to use index scans, thereby achieving the purpose of recommending indexes.

[0079] When the target keyword is a specified index keyword, the processing steps generally include: recording the index information in the database operation statement to a preset information table; obtaining the target index specified by the target keyword; deleting indexes other than the target index from the preset information table; increasing the cost of scan paths other than index scan paths in the generated path; and deleting scan paths other than index scan paths and full table scan paths in the generated path. This method ensures that when the optimizer calculates the cost of each scan path, it will find that only index scan paths and full table scan paths exist, thus achieving the goal of specifying the index. Furthermore, the reason for increasing the cost of other scan paths first and then deleting them is that during database execution, if the cost of other scan paths is not increased, the cost of index scan paths may be too high and automatically ignored by the optimizer. At the same time, to ensure the normal operation of the database, at least one valid path needs to be retained in the database scan path. Since full table scans are always valid during database execution, deleting scan paths other than index scan paths and full table scan paths avoids database errors caused by index scan path failures.

[0080] When the target keyword is an index-ignoring keyword, the processing steps generally include: recording the index information in the database operation statement to a preset information table; retrieving the target index specified by the target keyword; and deleting the target index from the preset information table. This method ensures that when the optimizer calculates the cost of each scan path subsequently, even if an index scan path is used, the specified index will be ignored, thus achieving the desired result.

[0081] Step S208: Calculate the cost consumed by each generated path.

[0082] Step S209: Sort the paths according to their costs and select the optimal generation path as the execution plan.

[0083] This method modifies the execution logic of recommended and specified index keywords, further enhancing the influence of index configuration statements on path selection. This controls the generation of the execution plan, ensuring database operations are executed as intended. Furthermore, when the selectivity exceeds a preset threshold, a full scan is directly employed, reducing database resource consumption.

[0084] Figure 3 This is a flowchart illustrating a method for processing database operation statements according to another embodiment of the present invention. In some optional embodiments, this process generally includes:

[0085] Step S301: Obtain index information from the information table. In this embodiment, the information table records index information from database operation statements, which generally includes index keywords and their specific index list information. Those skilled in the art can set the type and storage method of the information table according to actual conditions.

[0086] Step S302: Determine whether it is a recommended or specified index keyword. In some optional embodiments, the recommended index keyword is generally "use index," and the specified index keyword is generally "force index." Those skilled in the art can determine the specific form corresponding to different types of index keywords according to the actual situation.

[0087] Step S303: If the determination in step S302 is negative, determine whether the index keyword is ignored. In this embodiment, the index keyword can be "ignore index," which instructs the database to ignore the specific index specified by this keyword during the generation of the execution plan.

[0088] Step S304: If the determination in step S303 is yes, delete the specified index entry from the information table. An optional example in this step is: when the index keyword and its specified content are as shown in `ignore index(idx1, idx3)`, then delete indexes idx1 and idx3 from the information table, so that the database ignores idx1 and idx3 during the execution plan generation process.

[0089] In step S305, if the determination in step S302 is yes, only the specified index entries are retained in the information table. An optional example in this step is: when the index keyword and its specified content are, for example, `use index(idx1, idx2)`, then all indexes other than `idx1` and `idx2` are deleted from the information table, so that the database can only generate an execution plan using `idx1` and `idx3` during the process of generating the execution plan based on the index.

[0090] Step S306 involves adding a cost to scan paths other than the index scan. In some optional embodiments, the cost refers to a selection method used by the optimizer to determine the final selected path. This is achieved by sorting the costs of each path to select the optimal path and generate the corresponding execution plan. Therefore, in this step, increasing the cost of other scan paths increases the probability of the optimizer selecting the index scan path. Those skilled in the art can determine the specific method and value of increasing the cost based on the actual situation.

[0091] Step S307: Determine whether the selection rate is less than 1.

[0092] Step S308: If the determination in step S307 is negative, a full table scan is used. In this embodiment, when the selectivity is greater than or equal to 1, it indicates that the database operation statement will operate on the entire table. Therefore, a full table scan can be directly selected, thereby saving database server resources.

[0093] Step S309: If the determination in step S307 is yes, determine whether the index is available. In this embodiment, when the selectivity is less than 1, it means that the database operation statement will not operate on the entire table, so a more efficient execution plan can be generated through other paths, such as index scan.

[0094] Step S310: If the determination in step S309 is yes, determine whether it is a specified index keyword. In this embodiment, the specified index keyword can be "force index," which is used to instruct the database to specify the specific index specified by this keyword to generate the corresponding execution plan during the execution plan generation process.

[0095] Step S311: If the determination in step S310 is yes, delete all scan paths except for index scans and full table scans. This step ensures that the optimizer generates an execution plan using index scan paths when the index keyword is the specified index keyword. To guarantee the normal operation of the database, at least one valid scan path needs to be retained in the database's scan paths. Since full table scans are always valid during database execution, deleting scan paths other than index scan paths and full table scan paths avoids database errors caused by index scan path failures.

[0096] Step S312: If the conditions in steps S309, S310, and S311 are not met, the optimal path is calculated. In this embodiment, if step S309 is not met, it means there is no available index, i.e., the execution plan cannot be generated using the index scan path. Therefore, subsequent steps are skipped, and the optimal path is calculated directly. If step S310 is not met, it means the index keyword is a recommended index keyword. After the operations in steps S305 and S306, it is highly likely that the execution plan can be generated using the recommended index scan method. When step S311 is completed, only the index scan path exists, and the information table only contains the index specified by the index keyword, thus achieving the purpose of specifying the index.

[0097] This method modifies the execution logic of recommended and specified index keywords, further enhancing the influence of index configuration statements on path selection. This controls the generation of the execution plan, ensuring database operations are executed as intended. Furthermore, when the selectivity exceeds a preset threshold, a full scan is executed directly, reducing database resource consumption.

[0098] This embodiment also provides a machine-readable storage medium and a computer device. Figure 4 This is a schematic diagram of a machine-readable storage medium 401 according to an embodiment of the present invention. Figure 5 This is a schematic diagram of a computer device 503 according to an embodiment of the present invention.

[0099] The machine-readable storage medium 401 stores a machine-executable program 402 thereon, which, when executed by a processor, implements the processing method of database operation statements of any of the above embodiments.

[0100] Computer device 503 may include memory 501, processor 502, and machine-executable program 402 stored on memory 501 and running on processor 502. When processor 502 executes machine-executable program 402, it implements the processing method of database operation statements of any of the above embodiments.

[0101] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, such as generating an execution plan, may be specifically implemented in any machine-readable storage medium for use by, or in conjunction with, instruction execution systems, apparatuses, or devices (such as computer-based systems, processor-based systems, or other systems that can fetch and execute instructions from, an instruction execution system, apparatus, or device).

[0102] For the purposes of this embodiment, the machine-readable storage medium 401 may be any means that can contain, store, communicate, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device.

[0103] It should be understood that various parts of the present invention can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system.

[0104] Computer device 503 can be described in the general context of computer system executable instructions (such as program modules) executed by a computer system. Typically, program modules can include routines, programs, object programs, components, logic, data structures, etc., that perform specific tasks or implement specific abstract data types. Computer device 503 can be implemented in a distributed cloud computing environment where tasks are performed on remote processing devices linked via a communication network. In a distributed cloud computing environment, program modules can reside on local or remote computing system storage media, including storage devices.

[0105] Computer device 503 may include a processor 502 adapted to execute stored instructions and a memory 501 that provides temporary storage space for the operation of said instructions during operation. The processor 502 may be a single-core processor, a multi-core processor, a computing cluster, or any other configuration. The memory 501 may include random access memory (RAM), read-only memory, flash memory, or any other suitable storage system.

[0106] The processor 502 can be connected via a system interconnect (e.g., PCI, PCI-Express, etc.) to an I / O interface (input / output interface) suitable for connecting the computer device 503 to one or more I / O devices (input / output devices). I / O devices may include, for example, a keyboard and indicating devices, where indicating devices may include a touchpad or touchscreen, etc. I / O devices may be built into the computer device 503 or may be external devices connected to the computing device.

[0107] The processor 502 may also be linked via a system interconnect to a display interface suitable for connecting the computer device 503 to a display device. The display device may include a display screen as a built-in component of the computer device 503. The display device may also include an external computer monitor, television, or projector connected to the computer device 503. Furthermore, a network interface controller (NIC) may be adapted to connect the computer device 503 to a network via a system interconnect. In some embodiments, the NIC may use any suitable interface or protocol (such as an Internet Minicomputer System Interface) to transmit data. The network may be a cellular network, a radio network, a wide area network (WAN), a local area network (LAN), or the Internet, etc. Remote devices may connect to the computing device via the network.

[0108] The flowchart provided in this embodiment is not intended to indicate that the operations of the method will be performed in any particular order, or that all operations of the method are included in every case. Furthermore, the method may include additional operations. Within the scope of the technical concept provided by the method in this embodiment, additional variations can be made to the above method.

[0109] Therefore, those skilled in the art should recognize that although numerous exemplary embodiments of the present invention have been shown and described in detail herein, many other variations or modifications conforming to the principles of the present invention can be directly determined or derived from the disclosure of the present invention without departing from the spirit and scope of the invention. Thus, the scope of the present invention should be understood and construed as covering all such other variations or modifications.

Claims

1. A method for processing database operation statements, comprising: Obtain the database operation statement; Determine whether the database operation statement contains target keywords, including recommended index keywords; If so, extract the target keywords and their contents as index configuration information; The generation path of the execution plan is processed according to the index configuration information; The execution plan is generated based on the processed generation path; The step of processing the generation path of the execution plan according to the index configuration information includes: determining whether the target keyword in the index configuration information is the recommended index keyword; if so, processing the index scanning path in the generation path; and adding a cost to the scanning path other than the index scanning path in the generation path. The steps for processing the index scan path in the generated path include: recording the index information in the database operation statement to a preset information table; obtaining the target index specified by the target keyword; and deleting indexes other than the target index in the preset information table.

2. The method for processing database operation statements according to claim 1, wherein, The target keywords include the specified index keywords; The step of processing the generation path of the execution plan according to the index configuration information includes: Determine whether the target keyword in the index configuration information is the specified index keyword; If so, then the index scan path in the generated path is processed; This adds a cost to scan paths other than the index scan path in the generated path; Delete all scan paths except for index scan paths and full table scan paths in the generated paths.

3. The method for processing database operation statements according to claim 2, wherein, The steps for processing the index scan paths in the generated path include: Record the index information in the database operation statement to a preset information table; Retrieve the target index specified by the target keyword; Delete indexes other than the target index in the preset information table.

4. The method for processing database operation statements according to claim 1, wherein, The target keywords include keywords that are ignored in the index; The step of processing the generation path of the execution plan according to the index configuration information includes: Determine whether the target keyword in the index configuration information is the ignored index keyword; If so, the index information in the database operation statement is recorded in a preset information table; Retrieve the target index specified by the target keyword; Delete the target index from the preset information table.

5. The method for processing database operation statements according to claim 1, wherein, The step of generating the execution plan based on the processed generation path includes: Calculate the cost incurred for each of the generated paths; The optimal generation path is selected as the execution plan based on the cost.

6. The method for processing database operation statements according to claim 1, wherein, Following the step of obtaining the database operation statement, the following is also included: Calculate the selectivity of the database operation statement; Determine whether the selection rate is greater than a preset threshold; If so, then the execution plan is directly determined to be a full table scan.

7. A machine-readable storage medium having a machine-executable program stored thereon, wherein the machine-executable program, when executed by a processor, implements the method for processing database operation statements according to any one of claims 1 to 6.