Optimization method, device, equipment and storage medium for remote database objects
An optimization method and database technology, applied in the database field, can solve problems such as slow execution, high requirements, and inability to optimize, so as to reduce requirements, optimize network data transmission volume, and increase the effect of optimizing scenarios
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0033] figure 1 It is a schematic flowchart of a method for optimizing a remote database object provided by Embodiment 1 of the present invention. This embodiment is applicable to the SQL statement to be optimized involving both remote database objects and local database objects, or involving objects of multiple different remote databases at the same time In the case of optimization, the method can be executed by the remote database object optimization device in the embodiment of the present invention. The device can be implemented by hardware and / or software, and is generally integrated on the remote database object optimization device.
[0034] It can be understood that the optimization scheme for DBLINK in the prior art is not suitable for the situation that a SQL or sub-SQL statement involves both remote database objects and local database objects, or involves multiple objects of different remote databases at the same time. The reason is that the prior art scheme optimizes...
Embodiment 2
[0071] figure 2 It is a schematic flowchart of a remote database object optimization method provided by Embodiment 2 of the present invention. This embodiment is further optimized on the basis of Embodiment 1. In this embodiment, the database object corresponding to the first object query is optimized according to the first optimization rule, so as to optimize the network data transmission volume of the remote database node, which is embodied as: obtaining from the second target syntax item The first filter condition associated with the single remote database object; if the first filter condition is a Boolean expression connected with AND, then the first filter condition only includes the single remote database object The Boolean expression is removed and connected with "AND" to obtain a second filter condition; the second filter condition is sent together with the single remote database object to the first remote database node corresponding to the single remote database obje...
Embodiment 3
[0131] This embodiment is applicable to the situation that the SQL statement to be optimized involves the remote database object and the local database object, or when it involves objects of multiple different remote databases, the optimization is performed. In this embodiment, an actual DBLINK is created, and the SQL statement is executed as The examples illustrate the optimization methods corresponding to the three object query types in the foregoing embodiments.
[0132] Create a DBLINK locally, connect to the data source named "DM8" through ODBC, and specify the login user name SYSDBA and password SYSDBA:
[0133] CREATE LINK LNK01 CONNECT 'ODBC' WITH SYSDBA IDENTIFIED BY SYSDBA USING 'DM8';
[0134] Create table object T2 locally:
[0135] CREATE TABLE T2(D1INT,D2INT);
[0136] There are remote data objects T1, T3:
[0137] CREATE TABLE T1(C1INT,C2INT);
[0138] CREATE TABLE T3(E1INT,E2INT).
[0139] (1) The first object query - a single object query, that is, the FR...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


