CN113204568A - Method, device, equipment and storage medium for optimizing structured query statement - Google Patents

Method, device, equipment and storage medium for optimizing structured query statement Download PDF

Info

Publication number
CN113204568A
CN113204568A CN202110576536.8A CN202110576536A CN113204568A CN 113204568 A CN113204568 A CN 113204568A CN 202110576536 A CN202110576536 A CN 202110576536A CN 113204568 A CN113204568 A CN 113204568A
Authority
CN
China
Prior art keywords
connection
statement
query
item
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110576536.8A
Other languages
Chinese (zh)
Inventor
万伟
朱仲颖
韩朱忠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Dameng Database Co Ltd
Original Assignee
Shanghai Dameng Database Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Dameng Database Co Ltd filed Critical Shanghai Dameng Database Co Ltd
Priority to CN202110576536.8A priority Critical patent/CN113204568A/en
Publication of CN113204568A publication Critical patent/CN113204568A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24553Query execution of query operations
    • G06F16/24558Binary matching operations
    • G06F16/2456Join operations

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method, a device, equipment and a storage medium for optimizing a structured query statement. The method comprises the following steps: acquiring a structured query SQL statement containing a duplicate removal statement in a query item; determining a connection table to be eliminated which meets the elimination condition and is contained in the multi-table connection item; and eliminating the connection table to be eliminated from the multi-table connection item to obtain a target SQL statement. When the target SQL statement is executed, the method reduces the number of data tables in multi-table connection, improves the query efficiency, solves the problem of complex calculation and energy consumption when the multi-table connection generates overlarge Cartesian product data volume to perform SQL query, and achieves the effect of quickly finishing duplicate removal.

Description

Method, device, equipment and storage medium for optimizing structured query statement
Technical Field
The embodiment of the invention relates to the technical field of data processing, in particular to a method, a device, equipment and a storage medium for optimizing a structured query statement.
Background
Structured Query Language (SQL), a database Query and programming Language for accessing data and querying, updating, and managing relational database systems.
In the database operation based on the SQL statement, the multi-table join is a common operation in the SQL statement, and in practical applications, for the multi-table join without a filter condition, first, cartesian product calculation needs to be performed on the data tables participating in the join, and then, corresponding data results are queried in the cartesian product calculation results. When there is more data in the data table, the number of cartesian product data generated by the multi-table connection is huge, so that performing other SQL queries on the cartesian product data will bring corresponding performance loss.
Disclosure of Invention
The invention provides a method, a device, equipment and a storage medium for optimizing a Structured Query (SQL) statement, which aim to optimize the SQL statement of structured query with a duplication removal statement in a query item.
In a first aspect, an embodiment of the present invention provides a method for optimizing a structured query statement, including:
acquiring a structured query SQL statement containing a duplicate removal statement in a query item;
determining a connection table to be eliminated which meets the elimination condition and is contained in the multi-table connection item;
and eliminating the connection table to be eliminated from the multi-table connection item to obtain a target SQL statement.
Optionally, the determining a to-be-eliminated connection table that satisfies an elimination condition and is included in the multi-table connection entry includes:
when the SQL statement only comprises a query item and a multi-table connection item, determining a connection data table contained in the multi-table connection item;
traversing each connection data table if the connection relation does not exist among the connection data tables and each connection data table is not empty;
and when the connection data table meets the set reference judgment condition, determining the connection data table as the connection table to be eliminated.
Optionally, the step that the connection data table satisfies the set reference determination condition includes:
determining whether the join data table is referenced in an execution logic layer of the query term;
if not, determining that the connection data table meets the reference judgment condition.
Optionally, after obtaining the structured query SQL statement that includes the deduplication statement in the query item, the method further includes:
and carrying out semantic analysis on the SQL statement, and if a semantic error exists, carrying out semantic error prompt.
In a second aspect, an embodiment of the present invention further provides a device for optimizing a structured query statement, where the device includes:
the statement acquisition module is used for acquiring structured query SQL statements including duplicate removal statements in query terms;
the elimination determining module is used for determining a connection table to be eliminated, which meets the elimination condition and is contained in the multi-table connection item;
and the statement determining module is used for eliminating the connection table to be eliminated from the multi-table connection item to obtain the target SQL statement.
Optionally, the elimination determination module includes:
the data table determining unit is used for determining a connection data table contained in the multi-table connection item when the SQL statement only comprises a query item and the multi-table connection item;
the data table traversing unit is used for traversing each connection data table if the connection relation does not exist between the connection data tables and the connection data tables are not empty;
and the elimination table determining unit is used for determining the connection data table as the connection table to be eliminated when the connection data table meets the set reference judgment condition.
Optionally, the step that the connection data table satisfies the set reference determination condition includes:
determining whether the join data table is referenced in an execution logic layer of the query term;
if not, determining that the connection data table meets the reference judgment condition.
Optionally, the apparatus further comprises:
and the semantic analysis module is used for performing semantic analysis on the SQL statement after the structured query SQL statement containing the duplicate removal statement in the query item is obtained, and performing semantic error prompt if the semantic error exists.
In a third aspect, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor, when executing the program, implements the method for optimizing the structured query statement according to any embodiment of the present invention.
In a fourth aspect, embodiments of the present invention further provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform the method for optimizing a structured query statement according to any of the embodiments of the present invention.
According to the method, the structured query SQL statement containing the duplicate removal statement in the query item is obtained, the connection table to be eliminated, which meets the elimination condition, in the multi-table connection item is determined, the connection table to be eliminated is eliminated from the multi-table connection item, the target SQL statement is obtained, when the target SQL statement is executed, the number of data tables in multi-table connection is reduced, the query efficiency is improved, the problem that the calculation is complex and energy is consumed when the SQL query is carried out due to the fact that the Cartesian product data quantity generated by the multi-table connection is too large is solved, and the effect of rapidly completing the duplicate removal is achieved.
Drawings
FIG. 1 is a flowchart of a method for optimizing a structured query statement according to an embodiment of the present invention;
fig. 2 is a block diagram of a structural block diagram of a structured query statement optimizing apparatus according to a second embodiment of the present invention;
fig. 3 is a block diagram of a computer device according to a third embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be noted that, for convenience of description, only a part of the structures related to the present invention, not all of the structures, are shown in the drawings, and furthermore, embodiments of the present invention and features of the embodiments may be combined with each other without conflict.
Example one
Fig. 1 is a flowchart of a method for optimizing a structured query statement according to an embodiment of the present invention, where the embodiment is applicable to a case of optimizing a structured query SQL statement that includes a deduplication statement in a query term, and the method may be executed by a structured query statement optimization apparatus, and the apparatus may be implemented by software and/or hardware.
As shown in fig. 1, the method specifically includes the following steps:
and step 110, acquiring SQL statements containing the deduplication statements in the query items.
Generally, data in a database is operated by querying corresponding data first, so that data query is a core operation of the database, various database operations are often implemented by using SQL statements in database applications, and data query can also be implemented by using SQL language, it can be known that the premise of various operations performed by the SQL statements is to SELECT a data object to be operated, and selection of the data operation object can be implemented by constructing a corresponding SELECT statement in combination with a specific scenario, and in a scenario in which deduplication needs to be performed, the constructed SELECT statement needs to include a tidisprint clause for deduplication implementation. In this embodiment, the part between the SELECT keyword and the FROM keyword in the SELECT statement may be referred to as a query term, and the DISTINCT statement may be referred to as a deduplication statement.
Specifically, in this embodiment, in order to optimize the SQL statement including the deduplication statement, the currently formed SQL statement may be traversed through this step, so as to obtain the initial SQL statement including the DISTINCT statement.
Illustratively, the following gives an SQL statement related to the context of applying deduplication statements, which is specifically expressed as follows:
SELECT DISTINCT T1.C1 FROM T1,T2;
when the above statements are executed, firstly, result sets of data tables T1 and T2 are acquired, then Cartesian products of the two result sets are calculated, then values of C1 columns of T1 tables in the Cartesian products are acquired, DISTINCT calculation is carried out on the values of C1 columns, and finally calculation results are output. In this case, the values in column C1 are subjected to DISTINCT calculation, i.e., duplicate values in column C1 are removed.
Optionally, after step 110, the method may further include: and carrying out semantic analysis on the SQL statement, and if the semantic error exists, carrying out semantic error prompt.
Specifically, after the SQL statement input by the user is obtained, lexical, syntactic and semantic analysis may be performed on the SQL statement, and if the analysis result is successfully obtained and the analysis result is correct, the SQL statement may be further optimized by using the structured query statement optimization method provided in this embodiment, otherwise, a semantic error prompt may be performed to prompt the user to check for a syntactic error.
And step 120, determining the connection table to be eliminated which is contained in the multi-table connection item and meets the elimination condition.
In this embodiment, the part behind the FROM keyword in the FROM clause may be referred to as a multi-table join entry. The most common usage of the FROM statement is FROM + [ data sheet ], which may have one or more. When there are many data tables, it means that it is necessary to perform multi-table join operation on many data tables, and specially, when there is only one data table, it can also be treated as special multi-table join operation, i.e. after one data table is subjected to multi-table join operation, the result is still the original data table. In this embodiment, a data table in a multi-table join entry may be referred to as a join data table, where the multi-table join entry includes at least one join data table, and when a certain join data table is removed and does not affect the query result, the join data table may be referred to as a join table to be eliminated. The elimination condition may be understood as a condition for determining whether the presence or absence of a certain connection data table affects the query result.
Specifically, when the existence of a certain connection data table in the multi-table connection item does not affect the query result, the connection data table may be considered to satisfy the elimination condition, and may be determined as the connection table to be eliminated.
Optionally, step 120 may be implemented by:
s1, when the SQL statement only comprises the query item and the multi-table connection item, determining the connection data table contained in the multi-table connection item.
Specifically, it may be determined whether the SQL statement only includes the query term and the multi-table join term, but does not include other clauses, such as a WHERE clause, a hierarchical query, and the like. If the SQL statement includes only the query term and the multi-table join term, the data table included in the multi-table join term may be determined to be a join data table, and proceed to S2; otherwise, the SQL statement is not applicable to the statement optimization method provided in this embodiment, and the optimization operation is ended.
And S2, traversing each connection data table if no connection relation exists between the connection data tables and each connection data table is not empty.
Specifically, it can be determined whether a connection relationship exists between the connection data tables and whether each connection data table is not empty. A non-empty linked data table is understood to mean that the number of data lines recorded in the table is greater than 0. Since the cartesian product of a non-empty data table and an empty data table is an empty set, the statement cannot be optimized and rewritten accordingly, so if a connection relationship exists between the connection data tables or a connection data table is empty, the SQL statement is not applicable to the statement optimization method provided in this embodiment, and the optimization operation is ended, otherwise, the connection data tables are traversed and S3 is performed.
And S3, when the connection data table meets the set reference judgment condition, determining the connection data table as the connection table to be eliminated.
Specifically, when a certain connection data table satisfies the set reference determination condition, it may be considered that removing the connection data table does not affect the query result, and therefore, the connection data table may be determined as the connection table to be eliminated.
Optionally, the step of connecting the data table to satisfy the set reference determination condition may include: determining whether the join data table is referenced in an execution logic layer of the query term; if not, determining that the connection data table meets the reference judgment condition.
That is, when a certain connection data table is not referenced in the query entry, it can be determined that the connection data table satisfies the reference determination condition.
And step 130, eliminating the connection table to be eliminated from the multi-table connection item to obtain the target SQL statement.
The target SQL statement may be understood as the SQL statement after the connection table to be eliminated satisfying the elimination condition is eliminated from the SQL statement.
Specifically, the connection table to be eliminated, which is determined in step 120 and satisfies the elimination condition, is eliminated from the multi-table connection item, so as to obtain the target SQL statement.
Illustratively, the SQL statement including the deduplication statement in the query term is obtained by querying the SQL statement input by the user, such as the following statements:
SELECT DISTINCT T1.C1 FROM T1,T2;
wherein, table T1 and table T2 are not empty, the SQL statement only includes query terms and multi-table join terms, table T1 and table T2 do not have join relationships and neither table is empty, table T1 does not satisfy the set reference determination condition, and table T2 satisfies the set reference determination condition, so that table T2 is determined to be a join table to be eliminated, table T2 is eliminated from the multi-table join terms, and the target SQL statement is obtained as follows:
SELECT DISTINCT C1 FROM T1;
according to the technical scheme, the connection table to be eliminated, which meets the elimination condition, contained in the multi-table connection item is determined by obtaining the structured query SQL statement containing the duplicate removal statement in the query item, the connection table to be eliminated is eliminated from the multi-table connection item, the target SQL statement is obtained, when the target SQL statement is executed, the number of data tables in the multi-table connection is reduced, the query efficiency is improved, the problem that the Cartesian product data volume generated by the multi-table connection is too large, so that the calculation is complex and energy is consumed when the SQL query is carried out is solved, and the effect of quickly finishing the duplicate removal is achieved.
Example two
The structured query statement optimization device provided by the embodiment of the invention can execute the structured query statement optimization method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method. Fig. 2 is a block diagram of a structural block diagram of a structured query statement optimization apparatus according to a second embodiment of the present invention, as shown in fig. 2, the apparatus includes: a sentence acquisition module 210, a cancellation determination module 220, and a sentence determination module 230.
The statement obtaining module 210 is configured to obtain a structured query SQL statement that includes a deduplication statement in a query item.
A cancellation determining module 220, configured to determine a connection table to be cancelled, which satisfies a cancellation condition and is included in the multi-table connection entry;
and a statement determining module 230, configured to eliminate the connection table to be eliminated from the multi-table connection entry, and obtain a target SQL statement.
According to the technical scheme, the connection table to be eliminated, which meets the elimination condition, contained in the multi-table connection item is determined by obtaining the structured query SQL statement containing the duplicate removal statement in the query item, the connection table to be eliminated is eliminated from the multi-table connection item, the target SQL statement is obtained, when the target SQL statement is executed, the number of data tables in the multi-table connection is reduced, the query efficiency is improved, the problem that the Cartesian product data volume generated by the multi-table connection is too large, so that the calculation is complex and energy is consumed when the SQL query is carried out is solved, and the effect of quickly finishing the duplicate removal is achieved.
Optionally, the cancellation determining module 220 includes:
the data table determining unit is used for determining a connection data table contained in the multi-table connection item when the SQL statement only comprises a query item and the multi-table connection item;
the data table traversing unit is used for traversing each connection data table if the connection relation does not exist between the connection data tables and the connection data tables are not empty;
and the elimination table determining unit is used for determining the connection data table as the connection table to be eliminated when the connection data table meets the set reference judgment condition.
Optionally, the step that the connection data table satisfies the set reference determination condition includes:
determining whether the join data table is referenced in an execution logic layer of the query term;
if not, determining that the connection data table meets the reference judgment condition.
Optionally, the apparatus further comprises:
and the semantic analysis module is used for performing semantic analysis on the SQL statement after the structured query SQL statement containing the duplicate removal statement in the query item is obtained, and performing semantic error prompt if the semantic error exists.
EXAMPLE III
Fig. 3 is a block diagram of a computer apparatus according to a third embodiment of the present invention, as shown in fig. 3, the computer apparatus includes a processor 310, a memory 320, an input device 330, and an output device 340; the number of the processors 310 in the computer device may be one or more, and one processor 310 is taken as an example in fig. 3; the processor 310, the memory 320, the input device 330 and the output device 340 in the computer apparatus may be connected by a bus or other means, and the connection by the bus is exemplified in fig. 3.
The memory 320 is used as a computer-readable storage medium for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the structured query statement optimization method in the embodiment of the present invention (for example, the statement acquisition module 210, the elimination determination module 220, and the statement determination module 230 in the structured query statement optimization apparatus). The processor 310 executes various functional applications and data processing of the computer device by executing software programs, instructions and modules stored in the memory 320, namely, implements the above-described structured query statement optimization method.
The memory 320 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 320 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory 320 may further include memory located remotely from the processor 310, which may be connected to a computer device through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 330 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the computer apparatus. The output device 340 may include a display device such as a display screen.
Example four
A fourth embodiment of the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a method for optimizing a structured query statement, where the method includes:
acquiring a structured query SQL statement containing a duplicate removal statement in a query item;
determining a connection table to be eliminated which meets the elimination condition and is contained in the multi-table connection item;
and eliminating the connection table to be eliminated from the multi-table connection item to obtain a target SQL statement.
Of course, the storage medium containing the computer-executable instructions provided by the embodiments of the present invention is not limited to the method operations described above, and may also perform related operations in the structured query statement optimization method provided by any embodiments of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the structured query statement optimization apparatus, each unit and each module included in the embodiment are only divided according to functional logic, but are not limited to the above division as long as the corresponding function can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method for optimizing a structured query statement, comprising:
acquiring a structured query SQL statement containing a duplicate removal statement in a query item;
determining a connection table to be eliminated which meets the elimination condition and is contained in the multi-table connection item;
and eliminating the connection table to be eliminated from the multi-table connection item to obtain a target SQL statement.
2. The method for optimizing the structured query statement according to claim 1, wherein the determining the to-be-eliminated connection table included in the multi-table connection entry and satisfying the elimination condition comprises:
when the SQL statement only comprises a query item and a multi-table connection item, determining a connection data table contained in the multi-table connection item;
traversing each connection data table if the connection relation does not exist among the connection data tables and each connection data table is not empty;
and when the connection data table meets the set reference judgment condition, determining the connection data table as the connection table to be eliminated.
3. The method of claim 2, wherein the step of connecting the data tables to satisfy the set reference determination condition comprises:
determining whether the join data table is referenced in an execution logic layer of the query term;
if not, determining that the connection data table meets the reference judgment condition.
4. The method for optimizing the structured query statement according to claim 1, after obtaining the structured query SQL statement in which the query term includes the deduplication statement, further comprising:
and carrying out semantic analysis on the SQL statement, and if a semantic error exists, carrying out semantic error prompt.
5. A structured query statement optimization apparatus, comprising:
the statement acquisition module is used for acquiring structured query SQL statements including duplicate removal statements in query terms;
the elimination determining module is used for determining a connection table to be eliminated, which meets the elimination condition and is contained in the multi-table connection item;
and the statement determining module is used for eliminating the connection table to be eliminated from the multi-table connection item to obtain the target SQL statement.
6. The structured query statement optimization apparatus of claim 5, wherein the elimination determination module comprises:
the data table determining unit is used for determining a connection data table contained in the multi-table connection item when the SQL statement only comprises a query item and the multi-table connection item;
the data table traversing unit is used for traversing each connection data table if the connection relation does not exist between the connection data tables and the connection data tables are not empty;
and the elimination table determining unit is used for determining the connection data table as the connection table to be eliminated when the connection data table meets the set reference judgment condition.
7. The apparatus according to claim 6, wherein the step of connecting the data tables to satisfy the set reference determination condition comprises:
determining whether the join data table is referenced in an execution logic layer of the query term;
if not, determining that the connection data table meets the reference judgment condition.
8. The structured query statement optimization apparatus of claim 5, wherein the apparatus further comprises:
and the semantic analysis module is used for performing semantic analysis on the SQL statement after the structured query SQL statement containing the duplicate removal statement in the query item is obtained, and performing semantic error prompt if the semantic error exists.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the structured query statement optimization method of any one of claims 1 to 4 when executing the program.
10. A storage medium containing computer-executable instructions for performing the structured query statement optimization method of any one of claims 1-4 when executed by a computer processor.
CN202110576536.8A 2021-05-26 2021-05-26 Method, device, equipment and storage medium for optimizing structured query statement Pending CN113204568A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110576536.8A CN113204568A (en) 2021-05-26 2021-05-26 Method, device, equipment and storage medium for optimizing structured query statement

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110576536.8A CN113204568A (en) 2021-05-26 2021-05-26 Method, device, equipment and storage medium for optimizing structured query statement

Publications (1)

Publication Number Publication Date
CN113204568A true CN113204568A (en) 2021-08-03

Family

ID=77023185

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110576536.8A Pending CN113204568A (en) 2021-05-26 2021-05-26 Method, device, equipment and storage medium for optimizing structured query statement

Country Status (1)

Country Link
CN (1) CN113204568A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103168300A (en) * 2010-08-06 2013-06-19 移动解决方案公司 Incremental maintenance of immediate materialized views with outerjoins
CN105760419A (en) * 2015-01-07 2016-07-13 国际商业机器公司 Method And Systme For Join Processing
US20190347260A1 (en) * 2017-06-14 2019-11-14 Tencent Technology (Shenzhen) Company Limited Uncorrelated subquery optimization method and apparatus, and storage medium
CN111309753A (en) * 2020-01-21 2020-06-19 上海达梦数据库有限公司 Method, device and equipment for optimizing structured query statement and storage medium
CN112100198A (en) * 2020-09-09 2020-12-18 上海达梦数据库有限公司 Database SQL statement optimization method, device, equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103168300A (en) * 2010-08-06 2013-06-19 移动解决方案公司 Incremental maintenance of immediate materialized views with outerjoins
CN105760419A (en) * 2015-01-07 2016-07-13 国际商业机器公司 Method And Systme For Join Processing
US20190347260A1 (en) * 2017-06-14 2019-11-14 Tencent Technology (Shenzhen) Company Limited Uncorrelated subquery optimization method and apparatus, and storage medium
CN111309753A (en) * 2020-01-21 2020-06-19 上海达梦数据库有限公司 Method, device and equipment for optimizing structured query statement and storage medium
CN112100198A (en) * 2020-09-09 2020-12-18 上海达梦数据库有限公司 Database SQL statement optimization method, device, equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
LAILIKES: "TiDB逻辑优化规则", pages 1 - 11, Retrieved from the Internet <URL:《https://blog.csdn.net/songchuwang868/article/details/91522475》> *
海の云: "MySQL学习(六)-数据库优化理论(二)-查询优化技术", pages 1 - 18, Retrieved from the Internet <URL:《https://blog.csdn.net/cauchy8389/article/details/84335552》> *

Similar Documents

Publication Publication Date Title
US10572484B2 (en) Duplicate reduction or elimination with hash join operations
CN105608086B (en) Transaction processing method and device for distributed database system
US7461060B2 (en) Generalized partition pruning in a database system
US7822710B1 (en) System and method for data collection
US8965918B2 (en) Decomposed query conditions
US10146837B1 (en) RLE-aware optimization of SQL queries
WO2017019879A1 (en) Multi-query optimization
CN110968593B (en) Database SQL statement optimization method, device, equipment and storage medium
US10592509B2 (en) Declarative rules for optimized access to data
US20090063527A1 (en) Processing of database statements with join predicates on range-partitioned tables
US20090138448A1 (en) Processing database queries by returning results of a first query to subsequent queries
CN104765731A (en) Database query optimization method and equipment
CN110597844B (en) Unified access method for heterogeneous database data and related equipment
US11269880B2 (en) Retroreflective clustered join graph generation for relational database queries
CN110502532B (en) Method, device, equipment and storage medium for optimizing remote database object
US20200320074A1 (en) Filter Evaluation For Table Fragments
US7945560B2 (en) Technique for removing subquery in group by—having clauses using window functions
CN109299101B (en) Data retrieval method, device, server and storage medium
CN112765282A (en) Data online analysis processing method, device, equipment and storage medium
CN111309753B (en) Optimization method, device, equipment and storage medium of structured query statement
US8150865B2 (en) Techniques for coalescing subqueries
CN109117426B (en) Distributed database query method, device, equipment and storage medium
CN114860764A (en) Optimization method and system for distributed database query and electronic equipment
US10324933B2 (en) Technique for processing query in database management system
CN112199390A (en) Data query method, device, equipment and storage medium in database

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination