Method and system for eliminating left external connection and right table item in database

By judging distinct tags and unstable expressions in the database, traversing the list of external connection nodes, and deleting useless left outer connection right table entry, the problem of elimination of left outer connection right table entry that is difficult to widely use in the existing technology is solved, and the problem of elimination of left outer connection right table entry is improved. Query optimization efficiency.

CN118939841APending Publication Date: 2024-11-12广州海量数据库技术有限公司
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410995966.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-24
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

Existing database technology is difficult to effectively eliminate left-out connection right table entries in a wide range of scenarios, resulting in limited query optimization efficiency.

Method used

By judging whether there is a distinct tag in the query tree of the SQL statement, and detecting whether an unstable expression is referenced, traversing the list of external connection nodes, judging and deleting useless left outer connection right table entries based on the elimination conditions, and traversing the list again to perform optimization.

Benefits of technology

It improves the execution efficiency of SQL statements, reduces the search space of physical paths, and is suitable for various database scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118939841A_ABST
    Figure CN118939841A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of databases, and provides a method and system for eliminating left external connection and right table entries in a database, and the method comprises the steps: judging whether a query tree corresponding to a current SQL statement has a distinct mark or not, and if the query tree corresponding to the current SQL statement has the distinct mark, detecting whether the current SQL statement quotes an unstable expression or not; if the current SQL statement does not quote the unstable expression, traversing an external connection node list of the current SQL statement, performing elimination condition judgment on external connection nodes in the external connection node list, and when the external connection nodes meet the elimination condition, eliminating left external connection right table entries corresponding to the external connection nodes; and after the left external connection right table item corresponding to the external connection node is eliminated each time, traversing the external connection node list of the current SQL statement again, performing elimination condition judgment on the external connection node in the external connection node list, and executing elimination of the left external connection right table item according to a judgment result. According to the method, useless right table items of left external connection can be eliminated, and the execution efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of databases, and in particular to a method and system for eliminating left outer join right table items in a database. Background Art

[0002] When generating a connection path, the database needs to consider the connection paths between all tables. If some of the tables can be eliminated, the number of physical tables scanned can be reduced, IO operations can be reduced, and the efficiency of query optimization can be improved. Currently, many databases support optimization techniques that partially eliminate useless right table items in left outer joins, but this is limited to scenarios where the right table item of the join condition is a single table and the columns of the inner table in the join condition are unique.

[0003] Therefore, how to provide a left outer join right table item elimination method that is more applicable to a wider range of scenarios has become a technical problem that needs to be solved urgently. Summary of the invention

[0004] In view of this, in order to overcome the deficiencies of the prior art, the present invention aims to provide a method and system for eliminating the right table item of a left outer join in a database.

[0005] According to a first aspect of the present invention, there is provided a method for eliminating a left outer join right table item in a database, the method comprising:

[0006] Determine whether the query tree corresponding to the current SQL statement has a distinct tag. If the query tree corresponding to the current SQL statement has a distinct tag, check whether the current SQL statement references an unstable expression.

[0007] If the current SQL statement does not reference an unstable expression, traverse the outer join node list of the current SQL statement, and perform elimination condition judgment on the outer join nodes in the outer join node list. When the outer join node meets the elimination condition, eliminate the left outer join right table item corresponding to the outer join node;

[0008] After each elimination of the left outer join right table item corresponding to the outer join node, the outer join node list of the current SQL statement is traversed again, the elimination condition judgment is performed on the outer join nodes in the outer join node list, and the elimination of the left outer join right table item is executed according to the judgment result.

[0009] Preferably, in the method for eliminating the right table item of a left outer join in a database of the present invention, when performing semantic parsing on an SQL statement, if it is detected that the distinct keyword is specified in the projection output of the SQL statement, a corresponding distinct tag is set in the query tree.

[0010] Preferably, in the method for eliminating left outer join right table items in a database of the present invention, unstable expressions include volatile functions, aggregation operations, set operations, and rownum expressions.

[0011] Preferably, in the method for eliminating the right table item of the left outer join in the database of the present invention, in the database logic decomposition stage, all connections in the query tree are disassembled to convert the query tree into a flattened outer join node list, and the outer join node list stores the outer join nodes.

[0012] Preferably, in the method for eliminating the left outer join right table item in the database of the present invention, the outer join node list of the current SQL statement is traversed, and the outer join node in the outer join node list is judged for elimination conditions, including: traversing the outer join nodes in the outer join node list of the current SQL statement from left to right, and judging the elimination conditions of the outer join nodes according to the connection type of the outer join node and the connection condition reference relationship of the table of the outer join right table item.

[0013] Preferably, in the method for eliminating the left outer join right table item in the database of the present invention, when the outer join node meets the elimination condition, the left outer join right table item corresponding to the outer join node is eliminated, including: when the connection type of the outer join node is a left outer join, the outer join right table item of the outer join node has only one table, and the table of the outer join right table item is only referenced by the connection condition of the current connection node, the table in the right table item is deleted from all data structures that reference the table, and the current connection node is deleted from the outer join node list.

[0014] Preferably, in the method for eliminating left outer join right table items in a database of the present invention, when an outer join node meets the elimination condition, the left outer join right table item corresponding to the outer join node is eliminated, including: when the connection type of the outer join node is a left outer join, the outer join right table item of the outer join node contains multiple tables, and each table contained in the outer join right table item is only referenced by the connection condition between the table contained in the outer join right table item and the connected left table, the table in the right table item is deleted from all data structures that reference the table, and the current connection node is deleted from the outer join node list.

[0015] Preferably, in the method for eliminating left outer join right items in a database of the present invention, after each elimination of the left outer join right item corresponding to the outer join node, the outer join node list of the current SQL statement is traversed again, the elimination condition judgment is performed on the outer join nodes in the outer join node list, and the elimination of the left outer join right item is executed according to the judgment result, including: if there is no outer join node that meets the elimination condition in the outer join node list of the current SQL statement, stop eliminating the left outer join right item of the outer join node.

[0016] According to a second aspect of the present invention, a system for eliminating left outer join right items in a database is provided, the system comprising an elimination server, the elimination server being used to: determine whether a distinct mark exists in a query tree corresponding to a current SQL statement, if the distinct mark exists in the query tree corresponding to the current SQL statement, detect whether the current SQL statement references an unstable expression; if the current SQL statement does not reference an unstable expression, traverse the outer join node list of the current SQL statement, perform elimination condition judgment on the outer join nodes in the outer join node list, and when the outer join node meets the elimination condition, eliminate the left outer join right item corresponding to the outer join node; after each elimination of the left outer join right item corresponding to the outer join node, re-traverse the outer join node list of the current SQL statement, perform elimination condition judgment on the outer join nodes in the outer join node list, and execute elimination of the left outer join right item according to the judgment result.

[0017] According to a third aspect of the present invention, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in the first aspect of the present invention when executing the program.

[0018] The method and system of the present invention for eliminating right table items of left outer joins in a database, when the distinct keyword is specified in the projection output of an SQL statement, that is, when the column specified in the output of the SQL statement is unique, all outer joins in the SQL statement are checked, and when a left outer join meets certain conditions, the left outer join can be optimized, useless right table items can be eliminated, execution efficiency can be improved, and the search space of the physical path can be reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0020] Figure 1 An exemplary diagram of a system for eliminating a right table item of a left outer join in a database according to an embodiment of the present invention;

[0021] Figure 2 It is an example diagram of the steps of a method for eliminating a right table item of a left outer join in a database according to an embodiment of the present invention;

[0022] Figure 3 A schematic diagram of the structure of the device provided by the present invention. DETAILED DESCRIPTION

[0023] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0024] It should be noted that the following embodiments and features in the embodiments may be combined with each other in the absence of conflict; and, based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making any creative work are within the scope of protection of the present disclosure.

[0025] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein may be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present disclosure, it should be understood by those skilled in the art that an aspect described herein may be implemented independently of any other aspect, and two or more of these aspects may be combined in various ways. For example, any number of aspects described herein may be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein may be used to implement this device and / or practice this method.

[0026] Figure 1 FIG. 1 is an exemplary diagram of a system for eliminating right table items of left outer joins in a database according to an embodiment of the present invention. Figure 1 As shown, the system may include an elimination server 101, a communication network 102 and / or one or more elimination clients 103. Figure 1 The example shown is a plurality of elimination clients 103 .

[0027] The elimination server 101 can be any appropriate server for storing information, data, programs and / or any other suitable type of content. In some embodiments, the elimination server 101 can perform appropriate functions. For example, in some embodiments, the elimination server 101 can be used to eliminate the left outer join right table item in the database. As an optional example, in some embodiments, the elimination server 101 can be used to: determine whether there is a distinct mark in the query tree corresponding to the current SQL statement, if there is a distinct mark in the query tree corresponding to the current SQL statement, detect whether the current SQL statement references an unstable expression; if the current SQL statement does not reference an unstable expression, traverse the outer connection node list of the current SQL statement, perform elimination condition judgment on the outer connection nodes in the outer connection node list, and when the outer connection node meets the elimination condition, eliminate the left outer connection right table item corresponding to the outer connection node; after each elimination of the left outer connection right table item corresponding to the outer connection node, re-traverse the outer connection node list of the current SQL statement, perform elimination condition judgment on the outer connection nodes in the outer connection node list, and execute the elimination of the left outer connection right table item according to the judgment result.

[0028] As another example, in some embodiments, the elimination server 101 may send a method for eliminating the right table item of the left outer join in the database to the elimination client 103 for the user to use according to the request of the elimination client 103 .

[0029] As an optional example, in some embodiments, the elimination client 103 is used to provide a visual elimination interface, which is used to receive a user's selection input operation to eliminate the right table item of the left outer join in the database, and, in response to the selection input operation, obtain an elimination interface corresponding to the option selected by the selection input operation from the elimination server 101 and display the elimination interface, wherein the elimination interface at least displays information on eliminating the right table item of the left outer join in the database and operation options for eliminating the information on the right table item of the left outer join in the database.

[0030] In some embodiments, the communication network 102 can be any suitable combination of one or more wired and / or wireless networks. For example, the communication network 102 can include any one or more of the following: the Internet, an intranet, a wide area network (WAN), a local area network (LAN), a wireless network, a digital subscriber line (DSL) network, a frame relay network, an asynchronous transfer mode (ATM) network, a virtual private network (VPN), and / or any other suitable communication network. The elimination client 103 can be connected to the communication network 102 via one or more communication links (e.g., communication link 104), and the communication network 102 can be linked to the elimination server 101 via one or more communication links (e.g., communication link 105). The communication link can be any communication link suitable for transmitting data between the elimination client 103 and the elimination server 101, such as a network link, a dial-up link, a wireless link, a hard-wired link, any other suitable communication link, or any suitable combination of such links.

[0031] Elimination client 103 may include any one or more clients that present an interface related to high-speed access to ORC external tables in an appropriate form for use and operation by a user. In some embodiments, elimination client 103 may include any suitable type of device. For example, in some embodiments, elimination client 103 may include a mobile device, a tablet computer, a laptop computer, a desktop computer, and / or any other suitable type of client device.

[0032] Although the elimination server 101 is illustrated as one device, in some embodiments, any suitable number of devices may be used to perform the functions performed by the elimination server 101. For example, in some embodiments, multiple devices may be used to implement the functions performed by the elimination server 101. Alternatively, the functions of the elimination server 101 may be implemented using a cloud service.

[0033] Based on the above system, an embodiment of the present invention provides a method for eliminating a left outer join right table item in a database, which is described below through the following embodiments.

[0034] Figure 2 1 is a flowchart of a method for eliminating a right table item of a left outer join in a database according to an embodiment of the present invention. The method for eliminating a right table item of a left outer join in a database according to this embodiment can be executed at the elimination server end, such as Figure 2 As shown, the method for eliminating the right table item of the left outer join in the database includes the following steps:

[0035] Determine whether there is a distinct tag in the query tree corresponding to the current SQL statement. It should be noted that, in this embodiment, when performing semantic parsing on an SQL statement, if it is detected that the distinct keyword is specified in the projection output of the SQL statement, the corresponding distinct tag is set in the query tree.

[0036] If the query tree corresponding to the current SQL statement has a distinct tag, it is detected whether the current SQL statement references an unstable expression. As an optional example, in this embodiment, unstable expressions include volatile functions, aggregation operations, set operations, and rownum expressions. In this embodiment, if the query tree corresponding to the current SQL statement has a distinct tag, it indicates that the projection output of the current SQL statement specifies the distinct keyword, and the output will be deduplicated at the end of the SQL statement execution.

[0037] If the current SQL statement does not reference an unstable expression, the outer connection node list of the current SQL statement is traversed, and the outer connection nodes in the outer connection node list are judged for elimination conditions. In this embodiment, in the database logic decomposition stage, all connections in the query tree are disassembled to convert the query tree into a flattened outer connection node list, and the outer connection node list stores the outer connection nodes. It should be noted that in this embodiment, if the current SQL statement does not reference an unstable expression, in the left outer connection output, the right table satisfies the connection condition, resulting in the same duplicate data content in the left table output, and the left table output will offset the impact of the right table after deduplication.

[0038] As an optional example, in this embodiment, the outer connection nodes in the outer connection node list of the current SQL statement are traversed from left to right, and the elimination condition of the outer connection node is judged according to the connection type of the outer connection node and the connection condition reference relationship of the table of the outer connection right table item. When the outer connection node meets the elimination condition, the left outer connection right table item corresponding to the outer connection node is eliminated.

[0039] As an optional example, when the connection type of the outer connection node is left outer connection, the outer connection right table item of the outer connection node has only one table, and the table of the outer connection right table item is only referenced by the connection condition of the current connection node, the table in the right table item is deleted from all data structures that reference the table, and the current connection node is deleted from the outer connection node list. In this embodiment, when the connection type of the outer connection node is left outer connection, the right table will only affect the number of repetitions output by the left table, and will not modify the content of the left table output. The left outer connection is based on the left table, and the two tables are connected according to the conditions of the two tables given by the connection condition. As a result, all query information of the left table will be listed, while the right table will only list the part that meets the connection condition. Since the projection output of the statement specifies the distinct keyword, the output of the SQL statement will be deduplicated, and the influence of the right table on the number of repetitions output of the left table will be offset, and the right table item can be eliminated at this time. In this embodiment, when the outer connection right table item of the outer connection node has only one table, and the table of the outer connection right table item is only referenced by the connection condition of the current connection node, the table in the outer connection right table item will not affect the output of the SQL statement and can be eliminated. For example, for select distinct t1.a,t1.bfrom t1 left join t2 on t1.id=t2.id; in the left outer join t1 left join t2 on t1.id=t2.id, the right table item is a single table t2, and t2 is only referenced in the join condition t1.id=t2.id, then the condition is satisfied.

[0040] As an optional example, when the connection type of the outer join node is a left outer join, the outer join right table item of the outer join node contains multiple tables, and each table contained in the outer join right table item is referenced only by the join condition between the table contained in the outer join right table item and the connected left table, the table in the right table item is deleted from all data structures that reference the table, and the current connection node is deleted from the outer join node list. In this embodiment, the outer join right table item of the outer join node contains multiple tables, and each table contained in the outer join right table item is referenced only by the join condition between the table contained in the outer join right table item and the connected left table, then the multiple tables contained in the outer join right table item of the outer join node will not affect the output of the SQL statement and can be eliminated. For example, in explain select distinct t1.*from t1 left join(t2 join t3 on t2.id=t3.id)on t1.id=t2.id; left outer join t1 left join(t2 join t3 on t2.id=t3.id)ont1.id=t2.id, the right table item contains two tables: t1 and t2, and t2 is referenced only in the join conditions t2.id=t3.id and t1.id=t2.id, then the condition is satisfied.

[0041] It should be noted that, in this embodiment, after deleting each right table item that meets the elimination condition, the corresponding outer connection node in the outer connection node list that did not meet the elimination condition may also become an outer connection node that meets the elimination condition. Therefore, in this embodiment, after each elimination of the left outer connection right table item corresponding to the outer connection node, the outer connection node list of the current SQL statement is traversed again, the elimination condition of the outer connection nodes in the outer connection node list is judged, and the elimination of the left outer connection right table item is executed according to the judgment result.

[0042] If there is no outer join node that meets the elimination conditions in the outer join node list of the current SQL statement, stop eliminating the left outer join right table item of the outer join node.

[0043] The method and system for eliminating right table items of left outer joins in a database according to an embodiment of the present invention, when the distinct keyword is specified in the projection output of an SQL statement, that is, when the column specified in the output of the SQL statement is unique, all outer joins in the SQL statement are checked, and when a left outer join meets certain conditions, the left outer join can be optimized to eliminate useless right table items, thereby improving execution efficiency and reducing the search space of physical paths.

[0044] The method and system for eliminating the right table item of the left outer join in the database of this embodiment are applicable to various types of databases, such as various PostgreSQL databases. In practical applications, when the method and system for eliminating the right table item of the left outer join in the database of this embodiment are applied in the openGauss database, the data structure in the logic optimization module of the openGauss database, as well as the interface for detecting conditions and deleting tables can be effectively utilized; the method of this embodiment is performed after openGauss completes the connection promotion optimization, because the scenarios that can perform connection promotion are usually point checks, although it involves the connection of two tables, but the data that needs to be scanned often does not account for a large proportion; after completing the connection promotion optimization, if the method of this embodiment is still satisfied, it may be necessary to scan the two tables of the left connection, and the data in the right table is ultimately not needed. At this time, executing this optimization can eliminate the scan of the right table, greatly reducing IO and computing costs, and improving execution efficiency.

[0045] like Figure 3 As shown, the present invention also provides a device, including a processor 310, a communication interface 320, a memory 330 for storing a computer program executable by the processor, and a communication bus 340. The processor 310, the communication interface 320, and the memory 330 communicate with each other through the communication bus 340. The processor 310 implements the above-mentioned method of eliminating the right table item of the left outer join in the database by running the executable computer program.

[0046] Among them, the computer program in the memory 330 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0047] The system embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected based on actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.

[0048] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiment.

[0049] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A method for eliminating the right table item of a left outer join in a database. It is characterized in that The method comprises: Determine whether the query tree corresponding to the current SQL statement has a distinct tag. If the query tree corresponding to the current SQL statement has a distinct tag, check whether the current SQL statement references an unstable expression. If the current SQL statement does not reference an unstable expression, traverse the outer join node list of the current SQL statement, perform elimination condition judgment on the outer join nodes in the outer join node list, and when the outer join node meets the elimination condition, eliminate the left outer join right table item corresponding to the outer join node; After each elimination of the left outer join right table item corresponding to the outer join node, the outer join node list of the current SQL statement is traversed again, the elimination condition judgment is performed on the outer join nodes in the outer join node list, and the elimination of the left outer join right table item is executed according to the judgment result.

2. The method for eliminating the right table item of the left outer join in the database according to claim 1, It is characterized in that When performing semantic parsing on an SQL statement, if it is detected that a distinct keyword is specified in the projection output of the SQL statement, a corresponding distinct tag is set in the query tree.

3. The method for eliminating the right table item of the left outer join in the database according to claim 1, It is characterized in that Unstable expressions include volatile functions, aggregate operations, set operations, and rownum expressions.

4. The method for eliminating the right table item of the left outer join in the database according to claim 1, It is characterized in that In the database logic decomposition stage, the query tree is converted into a flattened outer connection node list by disassembling all connections in the query tree, and the outer connection node list stores the outer connection nodes.

5. The method for eliminating the right table item of the left outer join in the database according to claim 1, It is characterized in that Traversing the outer connection node list of the current SQL statement, and performing elimination condition judgment on the outer connection nodes in the outer connection node list, including: traversing the outer connection nodes in the outer connection node list of the current SQL statement from left to right, and performing elimination condition judgment on the outer connection nodes according to the connection type of the outer connection node and the connection condition reference relationship of the table of the outer connection right table item.

6. The method for eliminating the right table item of the left outer join in the database according to claim 1, It is characterized in that When the outer connection node meets the elimination condition, the left outer connection right table item corresponding to the outer connection node is eliminated, including: when the connection type of the outer connection node is a left outer connection, the outer connection right table item of the outer connection node has only one table, and the table of the outer connection right table item is only referenced by the connection condition of the current connection node, the table in the right table item is deleted from all data structures that reference the table, and the current connection node is deleted from the outer connection node list.

7. The method for eliminating the right table item of the left outer join in the database according to claim 1, It is characterized in that When an outer join node meets the elimination condition, the left outer join right table item corresponding to the outer join node is eliminated, including: when the connection type of the outer join node is a left outer join, the outer join right table item of the outer join node contains multiple tables, and each table contained in the outer join right table item is only referenced by the connection condition between the table contained in the outer join right table item and the connected left table, the table in the right table item is deleted from all data structures that reference the table, and the current connection node is deleted from the outer join node list.

8. The method for eliminating the right table item of the left outer join in the database according to claim 1, It is characterized in that After each elimination of the left outer join right table item corresponding to an outer join node, the outer join node list of the current SQL statement is traversed again, the elimination condition of the outer join nodes in the outer join node list is judged, and the elimination of the left outer join right table item is executed according to the judgment result, including: if there is no outer join node that meets the elimination condition in the outer join node list of the current SQL statement, the elimination of the left outer join right table item of the outer join node is stopped.

9. The system for eliminating left outer join right table items in a database according to claim 1, It is characterized in that The system includes an elimination server, which is used to: determine whether a distinct mark exists in a query tree corresponding to a current SQL statement; if a distinct mark exists in a query tree corresponding to the current SQL statement, detect whether the current SQL statement refers to an unstable expression; if the current SQL statement does not refer to an unstable expression, traverse the outer connection node list of the current SQL statement, perform elimination condition judgment on the outer connection nodes in the outer connection node list, and when the outer connection node meets the elimination condition, eliminate the left outer connection right table item corresponding to the outer connection node; after each elimination of the left outer connection right table item corresponding to the outer connection node, re-traverse the outer connection node list of the current SQL statement, perform elimination condition judgment on the outer connection nodes in the outer connection node list, and execute elimination of the left outer connection right table item according to the judgment result.

10. A computer device, It is characterized in that The computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the method according to any one of claims 1 to 8 when executing the program.

Citation Information

Cited By

  • A database outer join elimination method, apparatus, device, medium and product

    CN122795942A