WO2023066070A1 - Procédé et appareil de commande d'instruction sql - Google Patents

Procédé et appareil de commande d'instruction sql Download PDF

Info

Publication number
WO2023066070A1
WO2023066070A1 PCT/CN2022/124413 CN2022124413W WO2023066070A1 WO 2023066070 A1 WO2023066070 A1 WO 2023066070A1 CN 2022124413 W CN2022124413 W CN 2022124413W WO 2023066070 A1 WO2023066070 A1 WO 2023066070A1
Authority
WO
WIPO (PCT)
Prior art keywords
control strategy
control
statement
sql statement
sql
Prior art date
Application number
PCT/CN2022/124413
Other languages
English (en)
Chinese (zh)
Inventor
丁峰
吴迪
楼江航
孙梦石
吴学强
Original Assignee
阿里云计算有限公司
阿里巴巴(中国)有限公司
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 阿里云计算有限公司, 阿里巴巴(中国)有限公司 filed Critical 阿里云计算有限公司
Publication of WO2023066070A1 publication Critical patent/WO2023066070A1/fr

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/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/24552Database cache management

Definitions

  • the present application relates to the technical field of databases, in particular to a method and device for controlling SQL statements.
  • SQL Structured Query Language
  • Embodiments of the present application provide a method and device for controlling SQL statements, so as to overcome one or more problems in related technologies in the art.
  • the embodiment of the present application provides a control method of an SQL statement, which determines several control strategies configured by the user, wherein each control strategy corresponds to a waiting queue for caching the SQL statement that hits the control strategy, the method Including: if it is determined that the target SQL statement sent by the user hits at least one control strategy, then select one of the hit control strategies, and perform the following steps: if the waiting condition specified by the control strategy is satisfied, the target SQL statement Add to the waiting queue corresponding to the control strategy; with the current concurrent number not exceeding the maximum concurrent number specified by the control strategy as the goal, execute the SQL statements in the waiting queue in sequence; wherein, the current concurrent number is currently hitting the control strategy and the number of SQL statements being executed.
  • the embodiment of the present application provides a control device for SQL statements, which determines several control strategies configured by the user, wherein each control strategy corresponds to a waiting queue for caching SQL statements that hit the control strategy, and the device Including: a control module, if it is determined that the target SQL statement sent by the user hits at least one control strategy, then select one of the hit control strategies, and perform the following steps: if the waiting condition specified by the control strategy is satisfied, the described The target SQL statement is added to the waiting queue corresponding to the control strategy; with the goal that the current concurrent number does not exceed the maximum concurrent number specified by the control strategy, the SQL statements in the waiting queue are sequentially executed; wherein, the current concurrent number is the current The number of SQL statements that hit the control policy and are being executed.
  • Fig. 1 schematically shows the flow of a method for controlling an SQL statement according to an embodiment of the present application
  • FIG. 2 schematically shows a control flow of an SQL statement according to another embodiment of the present application
  • FIG. 3 schematically shows the architecture of a distributed database system according to an embodiment of the present application.
  • Fig. 4 schematically shows a structural block diagram of an apparatus for controlling SQL statements according to an embodiment of the present application.
  • the steps of the corresponding methods are not necessarily performed in the order shown and described in this application. In some other embodiments, the method may include more or fewer steps than those described in this application. In addition, a single step described in this application may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this application may also be combined into a single step in other embodiments describe.
  • the current database system is divided into a centralized database system and a distributed database system based on whether the database needs to be stored in fragments.
  • the centralized database system may include several computing nodes and a single storage node.
  • the database is stored by the single storage node.
  • the computing node is responsible for reading and writing the database on the storage node according to the received SQL statement.
  • the centralized database system can include multiple computing nodes, which are based on load balancing and receive different SQL statements from the load balancing device for execution.
  • a distributed database system may include several computing points and multiple storage nodes.
  • the multiple storage nodes store the database in pieces, and the database is distributed and deployed on multiple storage nodes.
  • the computing node is responsible for determining the corresponding data read and write requirements according to the received SQL statement, and then analyzes which fragmented data on the storage node needs to be operated.
  • a distributed database system may include multiple computing nodes, load balancing devices, and multiple storage nodes. Based on load balancing, the load balancing device distributes the SQL statement received from the user to a certain computing node among the plurality of computing nodes, and the computing node executes the SQL statement.
  • the database system resources mentioned in this application may refer to computing resources (such as CPU resources and memory resources) of computing nodes in the database system and IO resources of storage nodes.
  • Computing nodes in the database system can receive SQL statements sent by users, execute SQL statements, and implement operations (such as read operations and write operations) on databases deployed on storage nodes.
  • the users mentioned here can be individual users or institutional users. Users can register an account in the database system and log in to the account on their own business equipment cluster.
  • the business equipment in the business equipment cluster can send SQL statements to the database system according to the preset business logic to realize corresponding data read and write operations.
  • the database system receives too many SQL statements in a short period of time, that is, when the number of concurrent SQL statements is too large, according to the operation mode of the existing database system, these SQL statements need to be executed immediately.
  • the database system does not have enough resources to execute so many SQL statements in a short time, so too many SQL statements will compete for limited database system resources. If a SQL statement cannot be executed, the database system will return an execution failure result for the SQL statement, which may cause unexpected business losses to users. For example, SQL statements involving relatively important services may not be executed, causing relatively large service losses to users.
  • the technical solution provided by this application is that the user of the database system can configure several control strategies and provide them to the database system, and the database system can perform control operations on the SQL statements that hit the control strategy.
  • the control operation here may be, if the waiting condition specified by the control strategy is met, adding the SQL statement that hits the control strategy to the waiting queue corresponding to the control strategy.
  • the database system can sequentially execute the SQL statements in the waiting queue on the premise that the current concurrency does not exceed the maximum concurrency specified by the control policy. In this way, in the case of a large number of concurrent SQL statements, competition for limited database system resources by too many SQL statements can be avoided, reducing the pressure on the database system.
  • the embodiment of the present application provides a method for controlling an SQL statement.
  • the method is applied to a database system.
  • the database system predetermines several control strategies, wherein each control strategy corresponds to a waiting queue for caching the SQL statement that hits the control strategy.
  • Fig. 1 schematically provides the flowchart of the control method of a kind of SQL statement of an embodiment of the present application, as shown in Fig. 1, this method comprises following step S100 (as Fig. 1 middle 100, the step numbering also omits S among the following figures , will not be described in detail later) to S104:
  • step S100 if it is determined that the target SQL statement sent by the user hits at least one control strategy, one of the hit control strategies is selected, and steps S102-S104 are executed.
  • step S102 if the waiting condition specified by the control strategy is satisfied, the target SQL statement is added to the waiting queue corresponding to the control strategy.
  • step S104 the SQL statements in the waiting queue are sequentially executed with the goal that the current concurrent number does not exceed the maximum concurrent number specified by the control strategy; wherein, the current concurrent number is the currently executing SQL that hits the control strategy The number of statements.
  • the method flow shown in FIG. 1 can be applied to a database system, and if the database system has computing nodes, it can be applied to the computing nodes of the database system. If the database system has multiple computing nodes, the method flow shown in FIG. 1 can be applied to each computing node of the database system.
  • a database system is taken as an example for execution. Those skilled in the art should understand that in an embodiment where the database system includes computing nodes, the execution body in an implementation manner may be a computing node.
  • the control strategy configured by the user specifies which SQL statements are controlled (that is, which SQL statements can hit the control strategy), and how to control the SQL statements that hit the control strategy. Users can configure several different control strategies.
  • users can configure matching control policies for some unimportant business-related SQL statements.
  • the user may configure a hit control strategy for some SQL statements that take a relatively long time to execute (requiring more database system resources).
  • the control strategy configured by the user can have two states: effective and ineffective.
  • the control strategy configured by the user may not take effect, which means that any SQL statement will not be controlled.
  • the control policy configured by the user can take effect.
  • the user can manually validate at least part of the control policies configured by the user.
  • the database system may automatically take effect at least part of the control policies configured by the user when the resource shortage is detected.
  • this article describes the solution for a certain SQL statement sent by the user, and this certain SQL statement is called the target SQL statement.
  • the target SQL statement may not hit any effective control strategy.
  • the database system can normally start to execute the target SQL statement.
  • the target SQL statement may hit more than one control strategy. In this case, it is necessary to select a control strategy among the hit control strategies, and control the target SQL statement based on this control strategy. In some embodiments, among the control strategies hit by the target SQL statement, the control strategy most recently configured by the user may be selected.
  • Each control strategy may correspond to a waiting queue, wherein different control strategies may correspond to the same waiting queue, that is, different control strategies may share one waiting queue. Alternatively, different control strategies may correspond to different waiting queues. Alternatively, some control strategies can share the waiting queue, and some control strategies can have a dedicated waiting queue.
  • the waiting queue can be understood as a data structure created in a cache (such as a cache of a computing node), and is used for the SQL statement of the cache hit control strategy.
  • Each SQL statement in the waiting queue has a sequence.
  • the waiting queue can follow the principle of "first in, first out" or "first in, last out”. The order of the SQL statements entering the waiting queue can also be randomly assigned.
  • the control strategy generally specifies a waiting condition, and the SQL statement that hits the control strategy can only enter the waiting queue if it meets the waiting condition.
  • Waitable conditions can be set according to actual needs. For example, each control strategy can have a dedicated waiting queue, and the number of SQL statements in the waiting queue can have an upper limit.
  • the waiting condition is that the current waiting queue is not full, and the waiting condition is the waiting queue corresponding to the control strategy. The number of SQL statements does not reach the maximum number of waits specified by the control policy.
  • the target SQL statement if it is determined that the target SQL statement does not match at least one control policy, then execute the target SQL statement.
  • the control strategy generally specifies the maximum number of concurrency, which can be understood as the maximum number of SQL statements that currently hit the control strategy and are currently being executed.
  • the maximum number of concurrency can be specified by the user when configuring the control strategy. In theory, the maximum number of concurrency can be set to 0, which means that any SQL statement that hits the control strategy is currently not allowed to execute.
  • the step of judging whether the target SQL statement hits the control strategy includes: judging whether the target SQL statement satisfies the matching condition specified by the control strategy, if the matching condition is met , it is determined that the target SQL statement matches the control policy.
  • the matching condition includes at least one of the following: the SQL template corresponding to the target SQL statement belongs to the set of SQL templates specified by the control strategy; the target SQL statement contains keywords specified by the control strategy; the target SQL statement belongs to The SQL statement specified by the control strategy.
  • the database system may also predetermine the scope of application of the database corresponding to at least part of the control policies configured by the user; the scope of application of the database may include: at least part of the data tables in at least one database.
  • the matching condition specified by the at least part of the control strategy may include: the database execution scope corresponding to the target SQL statement is included in the database applicable scope of the at least part of the control strategy; wherein, the database execution scope includes at least one of the database At least part of the datasheet.
  • the database system also predetermines a statement source scope corresponding to at least part of the control policies configured by the user; the statement source scope may include: at least one device logged in by at least one user account.
  • the matching condition specified by at least part of the control policy may include: the device logged in by the user account that sends the target SQL statement is included in the source range of the statement.
  • the database system also predetermines a set of statement types corresponding to at least part of the control strategies configured by the user; the set of statement types may include at least one of the following: update statement update, query statement select, write statement insert, delete statement delete .
  • the matching conditions specified by the at least part of the control strategy may include: the statement type corresponding to the target SQL statement, included in the statement type set.
  • the database system also pre-enables the caching acceleration function corresponding to at least part of the control strategies configured by the user, and is used to statistically analyze the common statements that hit the control strategy based on the multiple SQL statements that hit the control strategy in history feature.
  • the step of judging whether the target SQL statement hits the control strategy includes: judging whether the target SQL statement has a common statement feature corresponding to the control strategy; if so, then determining the SQL statement Hit the control strategy; if not, judge whether the target SQL statement meets the matching condition specified by the control strategy, and if the matching condition is met, then determine that the target SQL statement hits the control strategy.
  • the database system can be saved as much as possible Resource, to complete the control of the SQL statement.
  • the time length of the target SQL statement in the waiting queue exceeds the maximum waiting time specified by the control strategy, it will be removed from the waiting queue, and an execution failure result will be returned to the user.
  • the maximum waiting time may also be specified by the user when configuring the control policy. In this way, if the SQL statement hits the control strategy, it can first enter the waiting queue to suspend execution, and if the waiting time of the SQL statement is too long, it can give up executing the SQL statement and return the execution failure result.
  • the execution may fail, and the execution failure result may be returned to the user.
  • the selected control strategy usually needs to satisfy the waiting condition. For example, among the control strategies hit by the target SQL statement, the control strategy that satisfies the waiting condition and is most recently configured may be selected.
  • the target SQL statement may be added to the waiting queue corresponding to the control policy after the thread occupied by the target SQL statement is recycled. In this way, once the target SQL statement hits the control strategy, it does not need to occupy the thread in the thread pool, and the thread can be returned to the thread pool, saving thread resources, and the target SQL is temporarily cached in the waiting queue.
  • the user can send a request to the database system, requesting to view a certain control strategy, and to view information related to the operation of the control strategy, such as the current number of concurrent SQL statements, the number of currently waiting SQL Returns the number of SQL statements that reported errors, the number of SQL statements that were hit in history, the number of SQL statements that were hit based on the cache acceleration function, and so on.
  • the user can send a request to the database system to delete a certain control policy.
  • users can also configure control policies in a relatively simple way. For example, according to the maximum execution time of the SQL statement specified by the user in advance, several SQL templates whose execution time is shorter than the maximum execution time can be filtered out, and the matching conditions can be determined based on the selected SQL templates; according to the matching conditions, the control strategy can be determined.
  • the user can simply specify the parameter of the maximum execution time, and the database system can automatically configure the corresponding control strategy to realize the control of the slow execution of the SQL statement.
  • the user can also specify parameters such as the maximum number of concurrency and the upper limit of the number of SQL templates allowed to be specified by the control policy.
  • the user may request the database system to check which SQL statement templates are determined by the database system to be controlled.
  • the database system can use the plan_cache table (data table for storing the SQL statement template) and the data table for storing the SQL statement template ID specified by the control strategy to perform an inner join operation based on the SQL statement template ID, and query the data specified by the control strategy.
  • the execution time is relatively long and each SQL statement template needs to be controlled, and these SQL statement templates are returned to the user.
  • some SQL statements that can hit the control strategy are already being executed. After the user configures the control strategy, these SQL statements are still being executed. For these SQL statements , in fact, it is too late to control before execution, so the execution can be stopped directly. That is to say, after any control strategy configured by the user is determined, if it is detected that there is an executing SQL statement that hits the control strategy, the execution of the SQL statement is terminated.
  • FIG. 2 schematically provides another control flow of SQL statements, which is applied to computing nodes in the database system.
  • the flow shown in FIG. 2 includes the following steps S200 to S218:
  • step S200 the target SQL statement to be executed is obtained.
  • step S202 according to the matching conditions specified by each control strategy configured by the user, it is judged whether the target SQL statement hits at least one control strategy, if yes, execute step S204, and if not, execute step S206.
  • step S204 among the control strategies hit by the target SQL statement, the control strategy configured by the user most recently is selected.
  • step S206 the target SQL statement is executed.
  • step S208 it is judged whether the waiting queue corresponding to the selected control strategy is full, if yes, execute step S210, if not, execute step S212.
  • step S210 the execution failure result is returned to the user or an error is reported to the user.
  • step S212 the target SQL statement is added to the waiting queue corresponding to the selected control strategy.
  • the SQL statements in the waiting queue are executed sequentially.
  • step S214 it is judged whether the duration of the target SQL statement in the waiting queue exceeds the maximum waiting duration specified by the control strategy, if yes, execute step S216, if not, execute step S218.
  • step S216 remove the target SQL statement from the waiting queue, and go to step S210.
  • step S2128 the target SQL statement continues to wait for execution in the waiting queue.
  • Fig. 3 schematically provides an architecture of a distributed database system.
  • the distributed database system includes a load balancing device, multiple computing nodes (three computing nodes are shown in the figure) and multiple storage nodes (three storage nodes are shown in the figure).
  • the load balancing device receives the request sent by the user.
  • the request sent by the user can be a SQL statement, or a query request or a deletion request for the control strategy deployed on the computing node.
  • the load balancing device needs to forward the request sent by the user to a certain computing node based on the load balancing.
  • the computing node controls the SQL statement based on several effective control strategies deployed, and based on the method flow shown in FIG. 1 . If you don't need to control the SQL statement, execute the SQL statement directly.
  • Computing nodes need to analyze SQL statements, and determine how to operate multiple storage nodes used to store data in slices based on the analysis results.
  • one computing node among the plurality of computing nodes may receive a control rule sent by the load balancing device in advance; the control rule is set by a user and provided to the load balancing device.
  • the computing node can parse the control rule into rule metadata, deploy a control policy locally based on the rule metadata, and store the rule source data into a metadata database. Then, the computing node broadcasts the new control strategy notification to other computing nodes. Then other computing nodes can read the rule metadata from the metadata database, and deploy control policies locally according to the rule metadata.
  • any computing node may respond to the policy query request sent by the user, and determine the control policy that the user requests to query. Then, the computing node can read the rule metadata corresponding to the control strategy from the metadata database, obtain local running status data about the control strategy, and obtain running status data about the control strategy from other nodes. Then, the computing node can return the rule metadata corresponding to the control policy and the obtained running status data to the user.
  • any computing node may, in response to the policy deletion request sent by the user, determine the control policy that the user requests to delete. Then, the computing node may delete the control policy, and delete rule metadata corresponding to the control policy in the metadata database. Then, the computing node broadcasts a policy deletion notification to other computing nodes, and other computing nodes can delete the control policy.
  • the user simply triggers the database system to generate a control strategy for SQL statements with a relatively long execution time.
  • the user only needs to simply specify the maximum execution time.
  • the thread occupied by it can be recovered, and the SQL statement is added to the waiting queue for caching.
  • the thread is reassigned to the SQL statement.
  • the thread resources occupied by it are released, and there is no need to save intermediate state data for the SQL statement, and the system overhead is small.
  • the user can request the database system to take effect at least part of the control policies pre-configured by the user to reduce the resource pressure of the database system. Moreover, if the effective control strategy can hit the SQL statement involving unimportant business, then it can ensure the smooth execution of the SQL statement corresponding to the important business of the user.
  • Figure 4 schematically provides a control device for SQL statements, which is applied to a database system.
  • the database system predetermines several control strategies configured by the user, wherein each control strategy corresponds to a waiting queue for caching the SQL that hits the control strategy.
  • statement that the means include:
  • Control module 401 if it is determined that the target SQL statement sent by the user hits at least one control strategy, then select one of the hit control strategies, and perform the following steps: if the waiting condition specified by the control strategy is satisfied, the target SQL statements are added to the waiting queue corresponding to the control strategy; with the goal that the current concurrent number does not exceed the maximum concurrent number specified by the control strategy, the SQL statements in the waiting queue are sequentially executed; wherein the current concurrent number is the current hit The control strategy and the number of SQL statements being executed.
  • the present application also provides a computer program, which implements the flow of the method shown in FIG. 1 or FIG. 2 when running.
  • the present application also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the process of the method shown in FIG. 1 or FIG. 2 is implemented.
  • the present application also provides a computing device, including a memory and a processor; the memory is used to store computer instructions that can be run on the processor, and the processor is used to implement the computer shown in FIG. 1 or FIG. 2 when executing the computer instructions. shows the method flow.
  • the present application has the following advantages:
  • the user of the database system can configure several control strategies and provide them to the database system, and the database system can perform control operations on SQL statements that hit the control strategies.
  • the specific control operation here may be, if the waiting condition specified by the control strategy is met, adding the SQL statement that hits the control strategy to the waiting queue corresponding to the control strategy.
  • the database system can sequentially execute the SQL statements in the waiting queue on the premise that the current concurrency does not exceed the maximum concurrency specified by the control policy. In this way, in the case of a large number of concurrent SQL statements, competition for limited database system resources by too many SQL statements can be avoided, reducing the pressure on the database system.
  • a typical implementing device is a computer.
  • the computer may be, for example, a personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, A wearable device or a combination of any of these devices.
  • the embodiments of the present invention may be provided as methods, systems, or computer program products. Accordingly, the present invention can 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, etc.) having computer-usable program code embodied therein.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types.
  • the application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network.
  • program modules may be located in both local and remote computer storage media including storage devices.
  • These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions
  • the device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
  • a computer includes one or more processors (CPUs), input/output interfaces, network interfaces and memory.
  • Memory may include non-permanent storage in computer-readable media, in the form of random access memory (RAM) and/or nonvolatile memory such as read-only memory (ROM) or flash RAM. Memory is an example of computer readable media.
  • RAM random access memory
  • ROM read-only memory
  • flash RAM flash random access memory
  • Computer-readable media including both permanent and non-permanent, removable and non-removable media, can be implemented by any method or technology for storage of information.
  • Information may be computer readable instructions, data structures, modules of a program, or other data.
  • Examples of computer storage media 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 Disc (DVD) or other optical storage, Magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by computing devices.
  • computer-readable media excludes transitory computer-readable media, such as modulated data signals and carrier waves.
  • digital items and digital identities are connected through digital identity technology, and the aforementioned digital identities may further include identity authentication information so that transactions of digital items can meet regulatory KYC requirements.
  • some or all digital identities are fully real-name authenticated, providing a fully real-name authenticated blockchain-based transaction system. Such a system is conducive to anti-money laundering and fraud operations, and becomes a truly credible transaction system.
  • the combination of digital items and the recording and verification functions attached to digital identities can easily record and verify transaction elements such as transaction objects and transaction participants, thereby improving the convenience and reliability of transactions .
  • the client of the transaction party invokes the smart contract in the blockchain system to create an association table between the digital item and its owner on the chain, and store the association relationship
  • the table is stored in the smart contract, and then the ownership of digital items is credibly recorded on the chain.
  • first, second, third, etc. may be used in multiple embodiments of the present application to describe various information, the information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of multiple embodiments of the present application, first information may also be called second information, and similarly, second information may also be called first information. Depending on the context, the word “if” as used herein may be interpreted as “at” or "when” or "in response to a determination.”
  • each embodiment in the present application is described in a progressive manner, the same and similar parts of each embodiment can be referred to each other, and each embodiment focuses on the differences from other embodiments.
  • the description is relatively simple, and for relevant parts, please refer to part of the description of the method embodiments.
  • the method embodiments described above are only illustrative, and the modules described as separate components may or may not be physically separated, and the functions of each module may be integrated in the same or multiple software and/or hardware implementations. Part or all of the modules can also be selected according to actual needs to achieve the purpose of the solution of this embodiment. It can be understood and implemented by those skilled in the art without creative effort.

Landscapes

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

Abstract

La présente demande concerne un procédé et un appareil de commande d'instruction SQL. Selon des modes de réalisation de la présente demande, un utilisateur d'un système de base de données peut configurer plusieurs stratégies de commande et fournir les stratégies de commande au système de base de données, et le système de base de données peut effectuer une opération de commande sur une instruction SQL qui correspond aux stratégies de commande. L'opération de commande peut spécifiquement être la suivante : si une condition d'attente spécifiée par les stratégies de commande est satisfaite, l'instruction SQL qui frappe les stratégies de commande est ajoutée à une file d'attente correspondant aux stratégies de commande. Le système de base de données peut exécuter séquentiellement les instructions SQL dans la file d'attente en supposant que le nombre d'accès actuel ne dépasse pas le nombre d'accès maximal spécifié par les stratégies de commande.
PCT/CN2022/124413 2021-10-20 2022-10-10 Procédé et appareil de commande d'instruction sql WO2023066070A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111223426.X 2021-10-20
CN202111223426.XA CN113961586A (zh) 2021-10-20 2021-10-20 一种sql语句的控制方法及装置

Publications (1)

Publication Number Publication Date
WO2023066070A1 true WO2023066070A1 (fr) 2023-04-27

Family

ID=79465176

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/124413 WO2023066070A1 (fr) 2021-10-20 2022-10-10 Procédé et appareil de commande d'instruction sql

Country Status (2)

Country Link
CN (1) CN113961586A (fr)
WO (1) WO2023066070A1 (fr)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113961586A (zh) * 2021-10-20 2022-01-21 阿里云计算有限公司 一种sql语句的控制方法及装置

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1869939A (zh) * 2005-05-27 2006-11-29 华为技术有限公司 一种多线程应用程序访问数据库的方法
US20110179015A1 (en) * 2010-01-21 2011-07-21 Oracle International Corporation Database query resource management using select statement condition
CN104346468A (zh) * 2014-11-14 2015-02-11 浪潮(北京)电子信息产业有限公司 一种在数据库系统中实现并发i/o的方法和装置
US20170017689A1 (en) * 2015-07-14 2017-01-19 Sap Se External offline query optimization
CN107563193A (zh) * 2017-08-28 2018-01-09 深信服科技股份有限公司 基于sql模板的数据库访问控制方法及系统
CN111563101A (zh) * 2020-07-11 2020-08-21 阿里云计算有限公司 执行计划优化方法、装置、设备及存储介质
CN113392126A (zh) * 2021-08-17 2021-09-14 北京易鲸捷信息技术有限公司 基于分布式数据库的执行计划缓存及读取方法
CN113961586A (zh) * 2021-10-20 2022-01-21 阿里云计算有限公司 一种sql语句的控制方法及装置

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1869939A (zh) * 2005-05-27 2006-11-29 华为技术有限公司 一种多线程应用程序访问数据库的方法
US20110179015A1 (en) * 2010-01-21 2011-07-21 Oracle International Corporation Database query resource management using select statement condition
CN104346468A (zh) * 2014-11-14 2015-02-11 浪潮(北京)电子信息产业有限公司 一种在数据库系统中实现并发i/o的方法和装置
US20170017689A1 (en) * 2015-07-14 2017-01-19 Sap Se External offline query optimization
CN107563193A (zh) * 2017-08-28 2018-01-09 深信服科技股份有限公司 基于sql模板的数据库访问控制方法及系统
CN111563101A (zh) * 2020-07-11 2020-08-21 阿里云计算有限公司 执行计划优化方法、装置、设备及存储介质
CN113392126A (zh) * 2021-08-17 2021-09-14 北京易鲸捷信息技术有限公司 基于分布式数据库的执行计划缓存及读取方法
CN113961586A (zh) * 2021-10-20 2022-01-21 阿里云计算有限公司 一种sql语句的控制方法及装置

Also Published As

Publication number Publication date
CN113961586A (zh) 2022-01-21

Similar Documents

Publication Publication Date Title
CN111338766B (zh) 事务处理方法、装置、计算机设备及存储介质
WO2018077073A1 (fr) Système de bases de données réparties, procédé de traitement de transaction, serveur de verrouillage et support d'informations
TWI271653B (en) Apparatus and method for multi-threaded processors performance control
JP5744707B2 (ja) メモリ使用量照会ガバナのためのコンピュータ実装方法、コンピュータ・プログラム、およびシステム(メモリ使用量照会ガバナ)
JP2531881B2 (ja) 並行制御方法
US11068506B2 (en) Selective dispatching of OLAP requests using execution statistics
US7565342B2 (en) Dynamic semi-join processing with runtime optimization
US8595366B2 (en) Method and system for dynamically creating and servicing master-slave pairs within and across switch fabrics of a portable computing device
US8789062B2 (en) Workload management of a concurrently accessed database server
US8756217B2 (en) Speculative switch database
US20060271504A1 (en) Performance data for query optimization of database partitions
WO2018120171A1 (fr) Procédé, dispositif et système d'exécution de procédure stockée
US7792819B2 (en) Priority reduction for fast partitions during query execution
CN110781244B (zh) 用于对数据库的并发操作进行控制的方法及装置
TW201715381A (zh) 用於在存在衝突時進行高效任務排程的方法
US10331499B2 (en) Method, apparatus, and chip for implementing mutually-exclusive operation of multiple threads
US8312007B2 (en) Generating database query plans
WO2017197830A1 (fr) Procédé et dispositif d'interrogation
WO2017148297A1 (fr) Procédé et dispositif de jointure de tables
US8015202B2 (en) Grouping predicted database queries
WO2023066070A1 (fr) Procédé et appareil de commande d'instruction sql
CN112084206A (zh) 数据库的事务请求处理方法、相关设备及存储介质
JP2018526746A (ja) データベーストランザクションを最適化するための方法および装置
JPH0950418A (ja) 疎結合並列処理環境において一時的記憶待ち行列機能を有する顧客情報制御システム及び方法
CN113791889B (zh) 一种基于多级轮询队列控制器部署学习模型的方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22882680

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE