CN111435351B - Database query optimization method, equipment and storage medium - Google Patents
Database query optimization method, equipment and storage medium Download PDFInfo
- Publication number
- CN111435351B CN111435351B CN201910035976.5A CN201910035976A CN111435351B CN 111435351 B CN111435351 B CN 111435351B CN 201910035976 A CN201910035976 A CN 201910035976A CN 111435351 B CN111435351 B CN 111435351B
- Authority
- CN
- China
- Prior art keywords
- query request
- optimization
- query
- execution plan
- description
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2453—Query optimisation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
- G06F16/24564—Applying rules; Deductive queries
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the application provides a database query optimization method, equipment and a storage medium. In the database query optimization method, when a query request is optimized, description features associated with the query request can be obtained in advance, and an optimization rule corresponding to the description features associated with the query request is selected to optimize the initial execution plan, so that the selection range of the optimization rule can be reduced, the time cost of database query optimization is effectively reduced, and the database query efficiency is improved.
Description
Technical Field
The present disclosure relates to the field of database technologies, and in particular, to a method, an apparatus, and a storage medium for optimizing database query.
Background
In general, to improve query efficiency, an initial execution plan corresponding to a query statement is optimized in a database by adopting an optimization rule.
In a common optimization method, an optimizer in a database selects optimization rules from alternative optimization rules one by one without distinction, optimizes an initial execution plan, calculates the execution cost of each optimized initial execution plan, and selects an optimal optimization rule according to the execution cost. However, this optimization scheme has a technical problem of high time cost.
Disclosure of Invention
Aspects of the present application provide a database query optimization method, device, and storage medium, so as to effectively reduce time cost of database query optimization and improve database query efficiency.
The embodiment of the application provides a database query optimization method, which comprises the following steps: responding to a query request aiming at a database, and acquiring description characteristics associated with the query request; according to the corresponding relation between the optimization rule and the description feature, selecting at least one optimization rule corresponding to the description feature associated with the query request from the optimization rules; and adopting the at least one optimization rule to perform optimization processing on the query request.
The embodiment of the application also provides a database query optimization method, which comprises the following steps: when a first query request aiming at a database is received, adopting at least one optimization rule to perform optimization processing on the first query request; comparing the execution cost corresponding to the first query request with the execution cost corresponding to each optimized first query request; screening out an optimization rule positively influencing the execution cost of the first query request from the at least one optimization rule according to the comparison result; and determining the corresponding relation between the positive optimization rule and the description feature associated with the first query request, so as to perform optimization processing on the second query request by adopting the positive optimization rule when the second query request matched with the description feature is received.
The embodiment of the application also provides a database query optimization method, which comprises the following steps: generating an initial execution plan corresponding to a data analysis request for a database in response to the data analysis request; acquiring description characteristics of the initial execution plan; according to the corresponding relation between the optimization rule and the description feature, selecting at least one optimization rule corresponding to the description feature of the initial execution plan from the optimization rules; and adopting the at least one optimization rule to perform optimization processing on the initial execution plan corresponding to the data analysis request.
The embodiment of the application also provides electronic equipment, which comprises: a memory and a processor; the memory is used for storing one or more computer instructions; the processor is configured to execute the one or more computer instructions to: responding to a query request aiming at a database, and acquiring description characteristics associated with the query request; according to the corresponding relation between the description features and the optimization rules, selecting at least one optimization rule corresponding to the description features associated with the query request from the optimization rules; and adopting the at least one optimization rule to perform optimization processing on the query request.
The embodiment of the application also provides a computer readable storage medium storing a computer program, and the computer program can realize the database query optimization method provided by the embodiment of the application when being executed.
The embodiment of the application also provides electronic equipment, which comprises: a memory and a processor; the memory is used for storing one or more computer instructions; the processor is configured to execute the one or more computer instructions to: when a first query request aiming at a database is received, adopting at least one optimization rule to perform optimization processing on the first query request; comparing the execution cost corresponding to the first query request with the execution cost corresponding to each optimized first query request; screening out an optimization rule positively influencing the execution cost of the first query request from the at least one optimization rule according to the comparison result; and determining the corresponding relation between the positive optimization rule and the description feature associated with the first query request, so as to perform optimization processing on the second query request by adopting the positive optimization rule when the second query request matched with the description feature is received.
The embodiment of the application also provides a computer readable storage medium storing a computer program, and the computer program can realize the database query optimization method provided by the embodiment of the application when being executed.
The embodiment of the application also provides electronic equipment, which comprises: a memory and a processor; the memory is used for storing one or more computer instructions; the processor is configured to execute the one or more computer instructions to: generating an initial execution plan corresponding to a data analysis request for a database in response to the data analysis request; acquiring description characteristics of the initial execution plan; according to the corresponding relation between the optimization rule and the description feature, selecting at least one optimization rule corresponding to the description feature of the initial execution plan from the optimization rules; and adopting the at least one optimization rule to perform optimization processing on the initial execution plan corresponding to the data analysis request.
The embodiment of the application also provides a computer readable storage medium storing a computer program, and the computer program can realize the database query optimization method provided by the embodiment of the application when being executed.
In the database query optimization method, the device and the storage medium provided by the embodiment of the application, when the query request is optimized, the description characteristic associated with the query request can be obtained in advance, and the optimization rule corresponding to the description characteristic associated with the query request is selected to optimize the initial execution plan, so that the selection range of the optimization rule can be reduced, the time cost of database query optimization is effectively reduced, and the database query efficiency is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute an undue limitation to the application. In the drawings:
FIG. 1 is a flowchart of a database query optimization method according to an embodiment of the present application;
FIG. 2 is a flowchart of a database query optimization method according to another embodiment of the present application;
FIG. 3 is a flowchart of a database query optimization method according to another embodiment of the present disclosure;
FIG. 4 is a flowchart of a database query optimization method according to another embodiment of the present disclosure;
FIG. 5 is a flowchart of a database query optimization method according to another embodiment of the present disclosure;
FIG. 6 is a flowchart of a database query optimization method according to another embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purposes, technical solutions and advantages of the present application, the technical solutions of the present application will be clearly and completely described below with reference to specific embodiments of the present application and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
Aiming at the technical problem of higher time cost when optimizing the query request in the prior art, in some embodiments of the present application, a solution is provided, and in the following, the technical solutions provided by the embodiments of the present application are described in detail with reference to the accompanying drawings.
FIG. 1 is a flowchart of a database query optimization method according to an exemplary embodiment of the present application, as shown in FIG. 1, the method includes:
And 103, adopting at least one optimization rule to perform optimization processing on the query request.
In this embodiment, the query request for the database may be actively initiated by the user under the query requirement, or may be actively initiated by other devices or systems under the triggering of a specific event (e.g. a timing event), which is not limited in this embodiment.
In some embodiments, optimizing the query request may be implemented as: and carrying out optimization processing on the query statement corresponding to the query request. For example, the fields and aliases in the query statement are optimized, or the redundant association relationships in the query statement are optimized.
In other embodiments, optimizing the query request may be implemented as: and optimizing the execution plan corresponding to the query request. Wherein the execution plan is a description of the execution process or access path of the query statement in the database.
Wherein the optimization rule indicates an optimization method adopted when optimizing the query request. Generally, different optimization rules correspond to different optimization methods. When the query request is optimized, and the query statement corresponding to the query request is optimized, the optimization rule may include a specific method for optimizing the query statement. When the optimization processing is performed on the query request, and is implemented as performing optimization processing on the execution plan corresponding to the query request, the optimization rule may include a specific method for optimizing the execution plan.
In some embodiments, the optimization rules may be formulated by a user and stored in a database. When a query request aiming at the database is received, the optimization rule stored in the database can be read to optimize the query request, so that the execution cost corresponding to the query request meets the set requirement.
The description features associated with the query requests are used for describing the features of the query requests so as to classify the same or similar query requests. In this embodiment, the description feature associated with the query request may be a description feature of the attribute of the query request itself; alternatively, it may be a description feature of attributes assigned to the query request by the database in response to the query request; alternatively, a combination of the two above descriptions is also possible, and the present implementation includes but is not limited to this.
Based on the description characteristics associated with the query requests, it can be determined whether query requests with the same or similar description characteristics appear in the historical query requests. Furthermore, when the query request is optimized, the optimization process of the historical query request can be used as a reference, so that the optimization efficiency is improved.
In this embodiment, when a query request is optimized, description features associated with the query request may be obtained in advance, and an optimization rule corresponding to the description features associated with the query request may be selected to optimize the query request, so that a selection range of the optimization rule may be reduced, time cost of database query optimization may be effectively reduced, and database query efficiency may be improved.
The database query optimization method provided in the above or the following embodiments is applicable to a plurality of different databases, including but not limited to: mySQL (Structured Query Language ) database, oracle database, access database, SQLServer database, SQLite database, etc.
In the foregoing or following embodiments, optionally, after optimizing the query request using at least one optimization rule, the following operations may be further performed:
and obtaining at least one optimized query request from the optimization processing result, and respectively calculating the query request and the execution cost corresponding to the at least one optimized query request. Alternatively, this step may be performed by an optimizer in the database. The optimizer can calculate the execution cost of each optimized query request by combining the information of the histogram, the storage structure characteristics of the table, the index structure, the partition type, the comparison operator and the like in the database. Among the execution costs include, but are not limited to: time cost, CPU (Central Processing Unit ) occupancy cost, I/O (Input/Output) interface occupancy cost, etc.
And then, according to the execution cost of the query request and the execution cost of each optimized query request, selecting an optimization rule positively influencing the execution cost of the query request from the at least one optimization rule. The optimization rule has positive influence on the execution cost of the query request, and the method can be as follows: compared with the execution cost of the query request, the execution cost corresponding to the query request after the query request is optimized by adopting the rule is reduced to a certain extent. For example, the required execution time cost of the optimized query request is reduced by 2 seconds, the CPU occupancy cost is reduced by 5% and/or the IO interface occupancy cost is reduced by 15% relative to the execution cost of the query request.
And then, establishing a corresponding relation between the optimization rule positively influencing the query request and the description characteristic associated with the query request so as to update the corresponding relation between the optimization rule and the description characteristic. Based on the above, when the next query request is received, the updated optimization rule and the corresponding relation of the description feature can be used as the basis for optimizing the next query request.
In the above or the following embodiments, when the description feature associated with the query request is the description feature of the attribute of the query request, the description feature associated with the query request includes, but is not limited to: descriptive characteristics of a query statement corresponding to a query request. When the descriptive feature associated with the query request is a descriptive feature assigned to an attribute of the query request by the database in response to the query request, the descriptive feature associated with the query request includes, but is not limited to: the database generates description features of the initial execution plan according to the query request. The following description will be made with reference to various embodiments.
Fig. 2 is a flowchart of a database query optimization method according to another exemplary embodiment of the present application, as shown in fig. 2, where the method includes:
And 203, adopting the at least one optimization rule to perform optimization processing on the initial execution plan corresponding to the query request.
Optionally, in this embodiment, when the database receives the query request, the query statement corresponding to the query request may be converted into the relational algebraic expression, so as to effectively improve the execution speed. Wherein the relational algebra expression is used to express query operations by operation on the relationships.
The conversion process can be implemented according to the corresponding relation between the relation operation type and the query statement contained in the relation algebra. For example, for an SQL query statement, a where statement in the SQL statement that indicates that a row satisfying a certain condition is selected may be converted into a selection (σ, selection) relational operation type in relational algebra. For another example, a select distint statement in the SQL statement that indicates which columns to select may be converted to a projection (pi) relational operation type in relational algebra.
Based on this, in step 201, an initial execution plan corresponding to the query request may be generated from the relational algebra expression, and descriptive features of the initial execution plan may be acquired.
The initial execution plan is an execution plan with basic execution cost generated by the database according to the query statement, and is the basis of subsequent optimization. Generally, when receiving a query request, the database can perform grammar auditing on a query statement corresponding to the query request, and after the grammar auditing is passed, perform expression conversion on the query statement, so as to obtain an initial execution plan corresponding to the query request.
Alternatively, one way of obtaining descriptive characteristics of the initial execution plan may include: and determining the relation operation type contained in the initial execution plan from the relation algebra expression corresponding to the initial execution plan as the description characteristic of the initial execution plan.
The above-described relational operation types include a conventional collective operation type and a specific relational operation type. Among the traditional set operation types include: and (Union), cross (Intersection Referential integrity), difference (Difference), generalized cartesian product (Extended cartesian product). Specific types of relational operations include: selection, projection, join, divide, and the like.
In this embodiment, one or more relationship operation types may be selected from the relationship algebraic expressions corresponding to the initial execution plan as the description features of the initial execution plan.
Alternatively, another way of obtaining descriptive characteristics of the initial execution plan may include: and determining the relation operation type and the operation times of each relation operation type contained in the initial execution plan from the relation algebra expression corresponding to the initial execution plan as the description characteristics of the initial execution plan.
In this embodiment, in addition to obtaining the relationship operation types included in the relationship algebra expression, the operation times of each relationship operation type may be obtained, and the relationship operation type and the corresponding operation times may be used together as the description feature of the initial execution plan. For example, the description features of an execution plan corresponding to an SQL query request may be expressed as: the "select" relationship operation type occurs twice, and the "project" relationship operation type occurs three times.
After determining the descriptive characteristics of the initial execution plan, step 202 may next be performed to select at least one optimization rule corresponding to the descriptive characteristics of the initial execution plan from among the existing optimization rules.
Alternatively, when the description feature of the initial execution plan includes a relationship operation type, at least one optimization rule corresponding to the relationship operation type included in the initial execution plan may be selected from the existing optimization rules according to the correspondence between the existing optimization rules and the relationship operation type. In the implementation mode, the matching range of the optimization rule is properly reduced, so that the hit rate of the optimization rule can be improved while the time cost of the query optimization process is reduced.
Optionally, when the description feature of the initial execution plan includes a relationship operation type and the operation times of each relationship operation type, at least one optimization rule corresponding to the relationship operation type and the operation times of each relationship operation type included in the initial execution plan may be selected from the existing optimization rules according to the existing optimization rules and the corresponding relationship between the relationship operation type and the operation times. According to the implementation mode, the matching operation of the optimization rule can be performed more accurately, and the time cost of the query optimization process is further reduced.
Of course, in some embodiments, the two ways of determining the optimization rules described above may be combined. For example, it may be determined whether or not there is an optimization rule corresponding to the relationship operation type included in the initial execution plan and the operation number of each relationship operation type in the existing optimization rule, so as to preferentially try a more accurate optimization rule matching operation. If not, then at least one optimization rule corresponding to the relation operation type contained in the initial execution plan is selected from the existing optimization rules. In this embodiment, the two ways of determining the optimization rule are combined, so that the matching operation of the optimization rule is preferably tried accurately, which is beneficial to further reducing the time cost of the query optimization process.
After determining at least one optimization rule, step 203 may be performed next, where the at least one optimization rule is used to optimize the initial execution plan corresponding to the query request.
In this embodiment, when an initial execution plan corresponding to a query request is optimized, description features of the initial execution plan may be obtained in advance, and an optimization rule corresponding to the description features of the initial execution plan is selected to optimize the initial execution plan.
Fig. 3 is a flowchart of a database query optimization method according to another exemplary embodiment of the present application, as shown in fig. 3, where the method includes:
And 303, adopting the at least one optimization rule to perform optimization processing on the initial execution plan corresponding to the query request.
In this embodiment, the descriptive characteristics associated with the query request may be determined based on the descriptive characteristics of the query request's own attributes.
Optionally, in step 301, the description feature of the self attribute of the query request may be expressed as: descriptive characteristics of a query statement corresponding to a query request. A manner of obtaining descriptive features of the query statement may include: and acquiring the operation type contained in the query statement, the operation object aimed by each operation type and/or the operation times of each operation type.
Among the types of operations include, but are not limited to: at least one of a create operation, a delete operation, an add operation, an update operation, a find operation, a sort operation, a sum operation, an average operation, and an extremum operation. Wherein, the operation objects aimed by each operation type include, but are not limited to: databases, tables, columns, primary keys, indexes, views, and the like.
After determining the descriptive characteristics of the query term, step 302 may be performed next, selecting at least one optimization rule corresponding to the descriptive characteristics of the query term from among the existing optimization rules.
Alternatively, in this embodiment, at least one optimization rule corresponding to the operation type included in the query statement may be selected from existing optimization rules.
Alternatively, in this embodiment, at least one optimization rule corresponding to an operation object for each operation type included in the query statement may be selected from existing optimization rules.
Alternatively, in this embodiment, at least one optimization rule corresponding to the number of operations of each operation type included in the query statement may be selected from existing optimization rules.
It should be noted that, in this embodiment, the above three operations of selecting the optimization rule may be performed separately or may be performed in any combination. When the three operations of selecting the optimization rule are executed simultaneously, the selected optimization rule corresponds to each operation type, an operation object aimed by each operation type and/or operation times of each operation type contained in the query statement, and at this time, a smaller selection range can be determined from the existing optimization rules so as to further improve the selection efficiency of the optimization rule.
After determining at least one optimization rule, step 303 may next be performed, where the at least one optimization rule is used to optimize an initial execution plan corresponding to the query request.
In this embodiment, when an initial execution plan corresponding to a query request is optimized, description features of query sentences may be obtained in advance, and an optimization rule corresponding to the description features of the query sentences is selected to optimize the initial execution plan, so that a selection range of the optimization rule may be reduced, time cost of database query optimization is effectively reduced, and database query efficiency is improved.
Fig. 4 is a flowchart of a database query optimization method according to another exemplary embodiment of the present application, as shown in fig. 4, where the method includes:
And 406, optimizing the initial execution plan corresponding to the query request by adopting at least one optimization rule corresponding to the description characteristics of the initial execution plan.
Alternative implementations of steps 401-405 may be described with reference to the foregoing examples, and are not repeated here.
Based on the description of the foregoing embodiment, the descriptive feature of the query statement is a more specific feature, and typically, such specific feature has a correspondence with a smaller number of existing optimization rules, so as to accurately match the optimization rules; the description features of the initial execution plan are relatively abstract features, and generally, the abstract features have corresponding relations with a large number of existing optimization rules.
Therefore, in the present embodiment, the characteristics of the image are preferably adopted, at least one optimization rule corresponding to the query request is selected from the known optimization rules, and the selection operation of the optimization rule can be preferably and accurately performed within a smaller selection range; when the smaller selection range does not exist, abstract features are adopted, at least one optimization rule corresponding to the query request is selected from the known optimization rules, and the time cost of the query optimization process is further reduced.
Optionally, in the embodiments corresponding to fig. 2, fig. 3, and fig. 4, after performing optimization processing on the initial execution plan corresponding to the query request by using at least one optimization rule corresponding to the description feature of the initial execution plan, the method further includes: obtaining at least one optimized execution plan from the result of the optimization process; calculating the initial execution plan and the execution cost corresponding to each of the at least one optimized execution plan; then, selecting an execution plan which has positive influence on the execution cost of the initial execution plan from the at least one optimized execution plan; and then, establishing a corresponding relation between the optimization rule corresponding to the execution plan generating positive influence and the description feature associated with the query request so as to update the corresponding relation between the optimization rule and the description feature, which is not repeated.
Fig. 5 is a flowchart of a database query optimization method according to another exemplary embodiment of the present application, as shown in fig. 5, where the method includes:
In some alternative embodiments, the at least one optimization rule involved in step 501 may be all or part of the optimization rules initially customized by the user.
In other alternative embodiments, the at least one optimization rule may be: from the optimization rules formulated by the user, positive influence on the optimization process of the query request similar to the first query request is generated.
In step 502, after the first query request is optimized by adopting at least one optimization rule, an execution cost corresponding to the optimized first query request and an execution cost corresponding to the first query request may be calculated respectively, and the execution cost corresponding to the optimized first query request and the execution cost corresponding to the first query request are compared.
In step 503, in some optional embodiments, according to the result of the comparison, one way of screening out the optimization rule that has a positive effect on the execution cost of the first query request from the at least one optimization rule includes: screening out a target query request from the optimized first query request, wherein the execution cost of the target query request is smaller than that of the first query request; and then, taking the optimization rule corresponding to the target query request as an optimization rule positively influencing the execution cost of the first query request.
For example, the at least one optimization rule comprises: optimization rule A, optimization rule B and optimization rule C; according to the optimization rule A, the optimization rule B and the optimization rule C, respectively optimizing the first query request to obtain a first query request A ', a first query request B ', and a first query request C '; then, the execution costs of the first query request, the first query request a ', the first query request B ', and the first query request C ' are calculated, respectively. Assuming that the execution cost of the first query request a 'and the first query request B' is smaller than the execution cost of the first query request, the optimization rule a and the optimization rule B may be used as the optimization rule that positively affects the execution cost of the first query request.
After determining the optimization rule that has a positive impact on the execution cost of the first query request, a correspondence between the positive-impact optimization rule and the descriptive feature associated with the first query request may be established at step 504. Based on this, when a second query request matching the description feature is received, the second query request may be optimized using the positive optimization rule. Furthermore, the optimization of the second query request can be realized quickly.
In this embodiment, after the query request is optimized by adopting at least one optimization rule, an optimization rule that positively influences the execution cost of the query request can be screened from at least one optimization rule according to the execution cost corresponding to the query request before optimization and the execution cost corresponding to the query request after optimization, and a correspondence between the positively influenced optimization rule and the feature associated with the query request is established for subsequent use. Based on the implementation mode, the optimization rules can be classified, so that the time cost of database query optimization is reduced, and the database query efficiency is improved.
Fig. 6 is a flowchart of a database query optimization method according to another exemplary embodiment of the present application, as shown in fig. 6, where the method includes:
And 603, selecting at least one optimization rule corresponding to the description feature of the initial execution plan from the optimization rules according to the corresponding relation between the optimization rules and the description feature.
And step 604, adopting the at least one optimization rule to perform optimization processing on the initial execution plan corresponding to the data analysis request.
In this embodiment, the method is applicable to an analysis database (Analysis of database), which is an analysis application-oriented database, and unlike a conventional database, can perform diversified analysis on data to mine data value, for example: the method can realize online statistics of data, multidimensional analysis of data and the like.
In this embodiment, after the database receives the data analysis request, an initial execution plan corresponding to the data analysis request may be generated, where the initial execution plan is an initial description of an execution process corresponding to the data analysis request.
The descriptive characteristics of the initial execution plan may then be obtained. Optionally, in this embodiment, a way to obtain the description feature of the initial execution plan may include: and determining the relation operation type contained in the initial execution plan from the relation algebra expression corresponding to the initial execution plan as the description characteristic of the initial execution plan. Another way of obtaining descriptive characteristics of the initial execution plan may include: and determining the relation operation type and the operation times of each relation operation type contained in the initial execution plan from the relation algebra expression corresponding to the initial execution plan as the description characteristics of the initial execution plan.
Then, according to the corresponding relation between the optimization rule and the description feature, at least one optimization rule corresponding to the description feature of the initial execution plan is selected from the optimization rules
Alternatively, when the description feature of the initial execution plan includes a relationship operation type, at least one optimization rule corresponding to the relationship operation type included in the initial execution plan may be selected from among the optimization rules according to the correspondence between the optimization rules and the relationship operation type.
Optionally, when the description feature of the initial execution plan includes a relationship operation type and an operation number of each relationship operation type, at least one optimization rule corresponding to the relationship operation type and the operation number of each relationship operation type included in the initial execution plan may be selected from the optimization rules according to the optimization rules and the corresponding relationship between the relationship operation type and the operation number.
Of course, in some embodiments, the two ways of determining the optimization rules described above may be combined. For example, it may be determined whether or not there is an optimization rule corresponding to the relationship operation type included in the initial execution plan and the operation number of each relationship operation type in the existing optimization rule, so as to preferentially try a more accurate optimization rule matching operation. If not, then at least one optimization rule corresponding to the relation operation type contained in the initial execution plan is selected from the existing optimization rules.
In this embodiment, when an initial execution plan corresponding to a data analysis request is optimized, description features of the initial execution plan may be obtained in advance, and an optimization rule corresponding to the description features of the initial execution plan is selected to optimize the initial execution plan, so that a selection range of the optimization rule may be reduced, time cost of data analysis optimization of a database may be effectively reduced, and data analysis efficiency of an analysis database may be improved.
It should be noted that, the execution subjects of each step of the method provided in the above embodiment may be the same device, or the method may also be executed by different devices. For example, the execution subject of steps 201 to 204 may be device a; for another example, the execution subject of steps 201 and 202 may be device a, and the execution subject of step 203 may be device B; etc.
In addition, in some of the flows described in the above embodiments and the drawings, a plurality of operations appearing in a specific order are included, but it should be clearly understood that the operations may be performed out of the order in which they appear herein or performed in parallel, the sequence numbers of the operations such as 201, 202, etc. are merely used to distinguish between the various operations, and the sequence numbers themselves do not represent any order of execution. In addition, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first" and "second" herein are used to distinguish different messages, devices, modules, etc., and do not represent a sequence, and are not limited to the "first" and the "second" being different types.
Fig. 7 is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present application. As shown in fig. 7, the electronic device includes: memory 701 and processor 702.
A processor 702 coupled with the memory 701 for executing the computer program in the memory 701 for: responding to a query request aiming at a database, and acquiring description characteristics associated with the query request; according to the corresponding relation between the description features and the optimization rules, selecting at least one optimization rule corresponding to the description features associated with the query request from the optimization rules; and adopting the at least one optimization rule to perform optimization processing on the query request.
Further optionally, the processor 702 is specifically configured, when responding to a query request for a database, to obtain a description feature associated with the query request: responding to the query request, generating an initial execution plan corresponding to the query request, and acquiring description features of the initial execution plan as description features associated with the query request; and/or, responding to the query request, and acquiring the description characteristic of the query statement corresponding to the query request as the description characteristic associated with the query request.
Further optionally, the processor 702 is specifically configured to, when acquiring the description feature of the initial execution plan as the description feature associated with the query request: determining a relation operation type contained in the initial execution plan from a relation algebra expression corresponding to the initial execution plan as a description characteristic associated with the query request; or determining the relation operation type and the operation times of each relation operation type contained in the initial execution plan from the relation algebra expression corresponding to the initial execution plan as the description characteristic associated with the query request.
Further optionally, the processor 702 is specifically configured to, when selecting at least one optimization rule corresponding to the description feature associated with the query request from the optimization rules according to the correspondence between the optimization rules and the description feature: selecting at least one optimization rule corresponding to the relation operation type contained in the initial execution plan from the optimization rules; or, at least one optimization rule corresponding to the relationship operation type included in the initial execution plan and the operation number of each relationship operation type is selected from the optimization rules.
Further optionally, when the processor 702 obtains the description feature of the query statement corresponding to the query request as the description feature associated with the query request, the processor is specifically configured to: and acquiring the operation type, the operation object aimed by each operation type and/or the operation times of each operation type contained in the query statement corresponding to the query request, and taking the operation types, the operation objects aimed by each operation type and/or the operation times of each operation type as description characteristics associated with the query request.
Further optionally, the processor 702 is specifically configured to, when selecting at least one optimization rule corresponding to the description feature associated with the query request from the optimization rules according to the correspondence between the optimization rules and the description feature: selecting at least one optimization rule corresponding to the operation type contained in the query statement from the optimization rules; and/or selecting at least one optimization rule corresponding to the operation object aimed at each operation type contained in the query statement from the optimization rules; and/or selecting at least one optimization rule corresponding to the operation times of each operation type contained in the query statement from the optimization rules.
Further optionally, the processor 702 is specifically configured to, when selecting at least one optimization rule corresponding to the description feature associated with the query request from the optimization rules according to the correspondence between the optimization rules and the description feature: judging whether an optimization rule corresponding to the description feature of the query statement exists in the optimization rule; if not, at least one optimization rule corresponding to the description characteristic of the initial execution plan is selected from the optimization rules.
Further optionally, the processor 702 is further configured to, after performing the optimization processing on the query request using the at least one optimization rule: obtaining at least one optimized query request from the optimized processing result; comparing the execution cost corresponding to the query request with the execution cost corresponding to each of the at least one optimized query request; selecting an optimization rule positively influencing the execution cost of the query request from the at least one optimization rule according to the comparison result; and establishing a corresponding relation between the optimization rule generating positive influence and the description characteristic associated with the query request so as to update the corresponding relation between the optimization rule and the description characteristic.
Further, as shown in fig. 7, the electronic device may further include: communication component 703, display 704, power component 705, audio component 706, and other components. Only some of the components are schematically shown in fig. 7, which does not mean that the electronic device only comprises the components shown in fig. 7.
In this embodiment, when the electronic device optimizes the initial execution plan corresponding to the query request, the description feature associated with the query request may be obtained in advance, and the optimization rule corresponding to the description feature associated with the query request may be selected to optimize the initial execution plan, so that the selection range of the optimization rule may be reduced, the time cost of database query optimization may be effectively reduced, and the database query efficiency may be improved. Accordingly, the embodiments of the present application further provide a computer readable storage medium storing a computer program, where the computer program when executed is capable of implementing each step in the database query optimization method in the method embodiment that may be executed by the electronic device.
Fig. 8 is a schematic structural diagram of an electronic device according to another exemplary embodiment of the present application. As shown in fig. 8, the electronic device includes: a memory 801 and a processor 802.
The processor 802 is configured to execute the one or more computer instructions for: when a first query request aiming at a database is received, adopting at least one optimization rule to optimize the first query request; comparing the execution cost corresponding to the first query request with the execution cost corresponding to each of the optimized first query requests; screening an optimization rule positively influencing the execution cost of the first query request from the at least one optimization rule according to the comparison result; and determining the corresponding relation between the positive optimization rule and the description feature associated with the first query request, so as to perform optimization processing on the second query request by adopting the positive optimization rule when the second query request matched with the description feature is received.
Further, as shown in fig. 8, the electronic device may further include: communication component 803, display 804, power component 805, audio component 806, and other components. Only some of the components are schematically shown in fig. 8, which does not mean that the electronic device only comprises the components shown in fig. 8.
In this embodiment, after the query request is optimized by adopting at least one optimization rule, an optimization rule that positively influences the execution cost of the query request can be screened from at least one optimization rule according to the execution cost corresponding to the query request before optimization and the execution cost corresponding to the query request after optimization, and a correspondence between the positively influenced optimization rule and the feature associated with the query request is established for subsequent use. Based on the implementation mode, the optimization rules can be classified, so that the time cost of database query optimization is reduced, and the database query efficiency is improved.
The embodiment of the application also provides a computer readable storage medium storing a computer program, and the computer program can realize the database query optimization method provided by the embodiment of the application when being executed.
Fig. 9 is a schematic structural view of an electronic device according to another exemplary embodiment of the present application. As shown in fig. 9, the electronic device includes: memory 901 and processor 902.
Wherein the memory 901 is configured to store one or more computer instructions.
The processor 902 is configured to execute the one or more computer instructions for: generating an initial execution plan corresponding to a data analysis request for a database in response to the data analysis request; acquiring description characteristics of the initial execution plan; selecting at least one optimization rule corresponding to the description feature of the initial execution plan from the optimization rules according to the corresponding relation between the optimization rules and the description feature; and adopting the at least one optimization rule to perform optimization processing on the initial execution plan corresponding to the data analysis request.
Further, as shown in fig. 9, the electronic device may further include: communication component 903, display 904, power supply component 905, audio component 906, and other components. Only some of the components are schematically shown in fig. 9, which does not mean that the electronic device only comprises the components shown in fig. 9.
In this embodiment, when an initial execution plan corresponding to a data analysis request is optimized, description features of the initial execution plan may be obtained in advance, and an optimization rule corresponding to the description features of the initial execution plan is selected to optimize the initial execution plan, so that a selection range of the optimization rule may be reduced, time cost of data analysis optimization of a database may be effectively reduced, and data analysis efficiency of an analysis database may be improved.
The embodiment of the application also provides a computer readable storage medium storing a computer program, and the computer program can realize the database query optimization method provided by the embodiment of the application when being executed.
In the corresponding embodiments of fig. 7, 8 and 9, the memory is used to store a computer program and may be configured to store various other data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on the electronic device, contact data, phonebook data, messages, pictures, videos, and the like. The memory may be implemented by any type of volatile or nonvolatile memory device or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
In the embodiments of fig. 7, 8 and 9, the communication component is configured to facilitate wired or wireless communication between the device in which the communication component is located and other devices. The device in which the communication component is located may access a wireless network based on a communication standard, such as WiFi,2G or 3G, or a combination thereof. In one exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component 503 may be implemented based on Near Field Communication (NFC) technology, radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In the embodiments corresponding to fig. 7, 8 and 9, the display includes a screen, which may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or sliding action, but also the duration and pressure associated with the touch or sliding operation.
In the embodiments of fig. 7, 8 and 9, the power supply assembly provides power to the various components of the device in which the power supply assembly is located. The power components may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the devices in which the power components are located.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and changes may be made to the present application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. which are within the spirit and principles of the present application are intended to be included within the scope of the claims of the present application.
Claims (15)
1. A method for optimizing database queries, comprising:
responding to a query request aiming at a database, and acquiring description characteristics associated with the query request;
according to the corresponding relation between the optimization rule and the description feature, selecting at least one optimization rule corresponding to the description feature associated with the query request from the optimization rules;
adopting the at least one optimization rule to perform optimization processing on the query request;
wherein the description feature associated with the query request comprises: descriptive features obtained from a relational algebraic expression of an initial execution plan of the query request; and/or describing characteristics of the query statement corresponding to the query request; the description features of the query statement include: the query statement includes an operation type, an operation object for each operation type, and/or an operation number of each operation type.
2. The method of claim 1, wherein, in response to a query request for a database, obtaining the descriptive characteristics associated with the query request comprises:
responding to the query request, generating an initial execution plan corresponding to the query request, and acquiring description features of the initial execution plan as description features associated with the query request; and/or the number of the groups of groups,
and responding to the query request, and acquiring the description characteristic of the query statement corresponding to the query request as the description characteristic associated with the query request.
3. The method of claim 2, wherein obtaining the descriptive feature of the initial execution plan as the descriptive feature associated with the query request comprises:
determining a relation operation type contained in the initial execution plan from a relation algebra expression corresponding to the initial execution plan as a description characteristic associated with the query request; or,
and determining a relation operation type and operation times of each relation operation type contained in the initial execution plan from a relation algebra expression corresponding to the initial execution plan, and taking the relation operation types and operation times of each relation operation type as description features associated with the query request.
4. A method according to claim 3, wherein selecting at least one optimization rule corresponding to the descriptive feature associated with the query request from among the optimization rules according to the correspondence of the optimization rules and the descriptive feature comprises:
selecting at least one optimization rule corresponding to a relation operation type contained in the initial execution plan from the optimization rules; or,
and selecting at least one optimization rule corresponding to the relation operation type contained in the initial execution plan and the operation times of each relation operation type from the optimization rules.
5. The method according to claim 1, wherein selecting at least one optimization rule corresponding to the descriptive feature associated with the query request from among the optimization rules according to the correspondence of the optimization rules and the descriptive feature comprises:
selecting at least one optimization rule corresponding to the operation type contained in the query statement from the optimization rules; and/or the number of the groups of groups,
selecting at least one optimization rule corresponding to an operation object aiming at each operation type contained in the query statement from the optimization rules; and/or the number of the groups of groups,
at least one optimization rule corresponding to the operation times of each operation type contained in the query statement is selected from the optimization rules.
6. The method according to any one of claims 2-5, wherein selecting at least one optimization rule corresponding to the descriptive feature associated with the query request from among the optimization rules according to the correspondence of the optimization rules and the descriptive feature comprises:
judging whether an optimization rule corresponding to the description characteristic of the query statement exists in the optimization rule;
and if the description features of the initial execution plan do not exist, selecting at least one optimization rule corresponding to the description features of the initial execution plan from the optimization rules.
7. The method of any of claims 1-5, further comprising, after optimizing the query request using the at least one optimization rule:
obtaining at least one optimized query request from the optimized processing result;
comparing the execution cost corresponding to the query request with the execution cost corresponding to each of the at least one optimized query request;
according to the comparison result, selecting an optimization rule positively influencing the execution cost of the query request from the at least one optimization rule;
and establishing a corresponding relation between the optimization rule generating positive influence and the description feature associated with the query request so as to update the corresponding relation between the optimization rule and the description feature.
8. A method for optimizing database queries, comprising:
when a first query request aiming at a database is received, adopting at least one optimization rule to perform optimization processing on the first query request;
comparing the execution cost corresponding to the first query request with the execution cost corresponding to each optimized first query request;
screening out an optimization rule positively influencing the execution cost of the first query request from the at least one optimization rule according to the comparison result;
determining a corresponding relation between the optimization rule generating positive influence and the description feature associated with the first query request, so as to perform optimization processing on a second query request by adopting the optimization rule generating positive influence when the second query request matched with the description feature is received;
wherein the description feature associated with the first query request includes: descriptive features obtained from a relational algebraic expression of an initial execution plan of the first query request; and/or describing characteristics of the query statement corresponding to the first query request; the description features of the query statement include: the query statement includes an operation type, an operation object for each operation type, and/or an operation number of each operation type.
9. A method for optimizing database queries, comprising:
generating an initial execution plan corresponding to a data analysis request for a database in response to the data analysis request;
acquiring description characteristics of the initial execution plan; the description features of the initial execution plan include: descriptive features obtained from a relational algebraic expression of the initial execution plan;
according to the corresponding relation between the optimization rule and the description feature, selecting at least one optimization rule corresponding to the description feature of the initial execution plan from the optimization rules;
and adopting the at least one optimization rule to perform optimization processing on the initial execution plan corresponding to the data analysis request.
10. An electronic device, comprising: a memory and a processor;
the memory is used for storing one or more computer instructions;
the processor is configured to execute the one or more computer instructions to: responding to a query request aiming at a database, and acquiring description characteristics associated with the query request; according to the corresponding relation between the description features and the optimization rules, selecting at least one optimization rule corresponding to the description features associated with the query request from the optimization rules; adopting the at least one optimization rule to perform optimization processing on the query request;
Wherein the description feature associated with the query request comprises: descriptive features obtained from a relational algebraic expression of an initial execution plan of the query request; and/or describing characteristics of the query statement corresponding to the query request; the description features of the query statement include: the query statement includes an operation type, an operation object for each operation type, and/or an operation number of each operation type.
11. A computer readable storage medium storing a computer program, characterized in that the computer program is capable of implementing the database query optimization method of any one of claims 1-7 when executed.
12. An electronic device, comprising: a memory and a processor;
the memory is used for storing one or more computer instructions;
the processor is configured to execute the one or more computer instructions to: when a first query request aiming at a database is received, adopting at least one optimization rule to perform optimization processing on the first query request; comparing the execution cost corresponding to the first query request with the execution cost corresponding to each optimized first query request; screening out an optimization rule positively influencing the execution cost of the first query request from the at least one optimization rule according to the comparison result; determining a corresponding relation between the optimization rule generating positive influence and the description feature associated with the first query request, so as to perform optimization processing on a second query request by adopting the optimization rule generating positive influence when the second query request matched with the description feature is received; wherein the description feature associated with the first query request includes: descriptive features obtained from a relational algebraic expression of an initial execution plan of the first query request; and/or describing characteristics of the query statement corresponding to the first query request; the description features of the query statement include: the query statement includes an operation type, an operation object for each operation type, and/or an operation number of each operation type.
13. A computer readable storage medium storing a computer program, wherein the computer program is capable of implementing the database query optimization method of claim 8 when executed.
14. An electronic device, comprising: a memory and a processor;
the memory is used for storing one or more computer instructions;
the processor is configured to execute the one or more computer instructions to: generating an initial execution plan corresponding to a data analysis request for a database in response to the data analysis request; acquiring description characteristics of the initial execution plan; the description features of the initial execution plan include: descriptive features obtained from a relational algebraic expression of the initial execution plan; according to the corresponding relation between the optimization rule and the description feature, selecting at least one optimization rule corresponding to the description feature of the initial execution plan from the optimization rules; and adopting the at least one optimization rule to perform optimization processing on the initial execution plan corresponding to the data analysis request.
15. A computer readable storage medium storing a computer program, wherein the computer program is capable of implementing the database query optimization method of claim 9 when executed.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910035976.5A CN111435351B (en) | 2019-01-15 | 2019-01-15 | Database query optimization method, equipment and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910035976.5A CN111435351B (en) | 2019-01-15 | 2019-01-15 | Database query optimization method, equipment and storage medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN111435351A CN111435351A (en) | 2020-07-21 |
| CN111435351B true CN111435351B (en) | 2023-05-26 |
Family
ID=71580767
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201910035976.5A Active CN111435351B (en) | 2019-01-15 | 2019-01-15 | Database query optimization method, equipment and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN111435351B (en) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113297206B (en) * | 2020-07-31 | 2025-02-21 | 阿里巴巴集团控股有限公司 | Multi-table connection processing method, device, equipment and machine-readable storage medium |
| CN114328614B (en) * | 2022-03-03 | 2022-07-05 | 阿里巴巴(中国)有限公司 | Query plan selection system, method, electronic device, and medium |
| CN116303579A (en) * | 2023-03-29 | 2023-06-23 | 北京人大金仓信息技术股份有限公司 | Database query optimization method, storage medium and equipment |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105279250A (en) * | 2015-10-08 | 2016-01-27 | 国网天津市电力公司 | Self-learning style based relational database query performance optimization method |
| CN107133281A (en) * | 2017-04-14 | 2017-09-05 | 浙江鸿程计算机系统有限公司 | A kind of packet-based global multi-query optimization method |
| CN108664516A (en) * | 2017-03-31 | 2018-10-16 | 华为技术有限公司 | Enquiring and optimizing method and relevant apparatus |
Family Cites Families (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6754652B2 (en) * | 2002-03-29 | 2004-06-22 | International Business Machines Corporation | Database query optimizer framework with dynamic strategy dispatch |
| US7167848B2 (en) * | 2003-11-07 | 2007-01-23 | Microsoft Corporation | Generating a hierarchical plain-text execution plan from a database query |
| US8352459B2 (en) * | 2009-07-23 | 2013-01-08 | International Business Machines Corporation | SQL queries for simple network management protocol management information base tables |
| US10503734B2 (en) * | 2015-07-14 | 2019-12-10 | Sap Se | External offline query optimization |
| US10521425B2 (en) * | 2016-08-31 | 2019-12-31 | Sap Se | Generating faster and efficient database query execution plans |
| US11436223B2 (en) * | 2017-01-30 | 2022-09-06 | Salesforce, Inc. | Query pin planner |
| WO2018223010A1 (en) * | 2017-06-01 | 2018-12-06 | Brandeis University | Systems, methods, and media for improving the effectiveness and efficiency of database query optimizers |
-
2019
- 2019-01-15 CN CN201910035976.5A patent/CN111435351B/en active Active
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105279250A (en) * | 2015-10-08 | 2016-01-27 | 国网天津市电力公司 | Self-learning style based relational database query performance optimization method |
| CN108664516A (en) * | 2017-03-31 | 2018-10-16 | 华为技术有限公司 | Enquiring and optimizing method and relevant apparatus |
| CN107133281A (en) * | 2017-04-14 | 2017-09-05 | 浙江鸿程计算机系统有限公司 | A kind of packet-based global multi-query optimization method |
Also Published As
| Publication number | Publication date |
|---|---|
| CN111435351A (en) | 2020-07-21 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN112749143B (en) | Query system, method executed by query system, and computer-readable medium | |
| US10534775B2 (en) | Cardinality estimation for database query planning | |
| US9195693B2 (en) | Transaction prediction modeling method | |
| EP3117347B1 (en) | Systems and methods for rapid data analysis | |
| US9031934B2 (en) | Estimation of a filter factor used for access path optimization in a database | |
| US11037096B2 (en) | Delivery prediction with degree of delivery reliability | |
| US11868326B2 (en) | Hyperparameter tuning in a database environment | |
| US20200320074A1 (en) | Filter Evaluation For Table Fragments | |
| CN107168977B (en) | Data query optimization method and device | |
| CN111435351B (en) | Database query optimization method, equipment and storage medium | |
| CN115168338B (en) | Data processing method, electronic device and storage medium | |
| EP3413214B1 (en) | Selectivity estimation for database query planning | |
| CN111294819A (en) | A kind of network optimization method and device | |
| CN105677751B (en) | Scheduling method and system of relational database | |
| CN117271481B (en) | Automatic database optimization method and equipment | |
| WO2023160673A1 (en) | Method and apparatus for database management system query planning | |
| US20140236880A1 (en) | System and method for automatically suggesting rules for data stored in a table | |
| US9256643B2 (en) | Technique for factoring uncertainty into cost-based query optimization | |
| US10282351B2 (en) | Using statistics for database partition pruning on correlated columns | |
| CN114238389A (en) | Database query optimization method, apparatus, electronic device, medium, and program product | |
| US20150370857A1 (en) | Multi-dimensional data statistics | |
| CN118689879B (en) | Target index recommendation method, electronic device and computer-readable storage medium | |
| US11379485B2 (en) | Inferred predicates for query optimization | |
| CN113448969B (en) | Data processing method, device and storage medium | |
| CN116501761A (en) | Query optimization method, device and storage medium |
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 | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |