WO2022057357A1 - 数据查询方法及装置、数据库系统 - Google Patents

数据查询方法及装置、数据库系统 Download PDF

Info

Publication number
WO2022057357A1
WO2022057357A1 PCT/CN2021/101727 CN2021101727W WO2022057357A1 WO 2022057357 A1 WO2022057357 A1 WO 2022057357A1 CN 2021101727 W CN2021101727 W CN 2021101727W WO 2022057357 A1 WO2022057357 A1 WO 2022057357A1
Authority
WO
WIPO (PCT)
Prior art keywords
query
page
data
target
storage node
Prior art date
Application number
PCT/CN2021/101727
Other languages
English (en)
French (fr)
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 WO2022057357A1 publication Critical patent/WO2022057357A1/zh

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9532Query formulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions

Definitions

  • the present application relates to the field of databases, and in particular, to a data query method and device, and a database system.
  • a database system includes a computing node and a plurality of storage nodes connected to the computing node.
  • the computing node is used for data processing by executing transactions, and the storage node is used for storing data.
  • the storage node includes at least one page (page), and data is stored in the page.
  • the computing nodes in the database system read pages from multiple storage nodes in the database system, and perform data query on the read pages according to the query conditions .
  • the computing node needs to read pages from multiple storage nodes to perform data query, the data query resource overhead is high and the data query efficiency is low, which easily affects the performance of the database system.
  • the present application provides a data query method and device, and a database system, which help to improve the performance of the database system.
  • the technical solution of this application is as follows:
  • a data query method is provided, which is applied to a computing node in a database system, and the method includes:
  • a data query request carrying query conditions When receiving a data query request carrying query conditions, obtain a query code according to the query conditions; send the query code to at least one target storage node in the database system, and each target storage node is used to execute the query code in the database system.
  • Data query is performed on a target page in a target storage node, and the at least one target storage node is at least one of the storage nodes connected to the computing node in the database system.
  • the target storage node since the computing node obtains the query code according to the query conditions and sends the query code to the target storage node, the target storage node performs data query on the target page in the target storage node by executing the query code, so The data query can be performed without the computing node reading pages from the target storage node, which helps to reduce the resource overhead of the data query, improve the data query efficiency, and thus improve the performance of the database system.
  • the solution provided by the present application does not require the target storage node to generate query codes, the number of times of interpretation of query conditions is less, and the execution speed of data query is faster.
  • acquiring the query code according to the query condition includes: generating the query code based on a code generation technology according to the query condition.
  • the computing node can support a code generation technology, and generate a query code based on the code generation technology, thereby facilitating the computing node to obtain the query code.
  • acquiring the query code according to the query condition includes: inputting the query condition into a code generator, where the code generator is configured to generate and output a query code based on a code generation technology according to the query condition; acquiring the query output by the code generator code.
  • the computing node may have a code generator, and the computing node may generate the query code based on the code generation technology through the code generator, thereby facilitating the computing node to obtain the query code.
  • the method further includes: sending a page query request to the at least one target storage node, where the page query request carries at least one of page information and transaction information of a currently active transaction in the computing node, the page information indicating For the target page, the currently active transaction is the transaction that is being executed on the computing node when the page query request is sent.
  • the computing node by sending a page query request to a target storage node, the computing node can facilitate the target storage node to perform data query on the target page of the target storage node according to the transaction information of the current active transaction in the computing node, And help to improve the accuracy of data query.
  • the query condition includes at least one field data to be queried; before sending the query code to at least one target storage node in the database system, the method further includes: according to the first mapping relationship between the field data and the page, determining the At least one target page where at least one field data to be queried is located, and the first mapping relationship is used to indicate the page where the field data is located; according to the second mapping relationship between the page and the storage node, determine the storage node where each target page is located, and the first mapping relationship is used to determine the storage node where each target page is located.
  • the binary mapping relationship indicates the storage node where the page is located; the storage node where the at least one target page is located is determined as the at least one target storage node.
  • both the first mapping relationship and the second mapping relationship may be an index relationship, and both the first mapping relationship and the second mapping relationship may be maintained by a computing node, which helps the computing node to The first mapping relationship determines the target page where the field data to be queried is located, and the storage node where the target page is located is determined according to the second mapping relationship, thereby determining the target storage node.
  • a data query method is provided, which is applied to a target storage node in a database system.
  • the method includes: receiving a query code sent by a computing node in the database system, where the query code is based on the data received by the computing node.
  • the query condition carried in the query request is obtained; the data query is performed on the target page of the target storage node by executing the query code.
  • the technical solution provided by the present application can perform data query without the computing node reading pages from the target storage node, which helps to reduce the resource overhead of data query, improve data query efficiency, and thus improve the performance of the database system.
  • the target storage node there is no need for the target storage node to generate query code, the number of interpretations of query conditions is less, and the execution speed of data query is faster.
  • the method further includes: receiving a page query request sent by the computing node, where the page query request carries at least one of page information and transaction information of a currently active transaction in the computing node, the page information indicating the target page, the current active transaction is the transaction that is being executed on the computing node when the page query request is sent.
  • the page query request carries page information and transaction information of the currently active transaction in the computing node; performing data query on the target page of the target storage node by executing the query code includes: carrying the query request according to the page.
  • the target page is determined in the target storage node; according to the transaction information of the currently active transaction carried in the page query request, the data query is performed row by row in the target page by executing the query code.
  • the target storage node by receiving the page query request sent by the computing node, the target storage node can facilitate the target storage node to perform data query on the target page of the target storage node according to the transaction information of the current active transaction in the computing node. , and help to improve the accuracy of data query.
  • the target page includes at least one row of data records, each row of data records includes transaction information and at least one field data, and the transaction information in each row of data records indicates a transaction for operating the data record; according to the page query request carries The transaction information of the currently active transaction, by executing the query code in the target page to perform data query by row, including: for each row of data records in the target page, by performing the following processing steps to perform data query; wherein, the processing The step includes: according to the transaction information in the data record and the transaction information of the current active transaction, judging whether the data record is visible to the target transaction on the computing node, and the target transaction is the transaction processing the data query request on the computing node ; if the data record is visible to the target transaction, execute the query code for the data record to determine whether the data record satisfies the query condition; if the data record satisfies the query condition, determine the data record as the queried data Record.
  • the target storage node judges whether the data record is visible to the target transaction, and if the data record is visible to the target transaction, the query code is executed for the data record, which helps to improve the accuracy of data query. sex. For example, after the computing node sends a page query request to the target storage node, the computing node inserts a row of data records in the target storage node by executing a transaction (during this process, the target storage node is still performing data query), then the target The query result obtained by the query operation performed by the storage node should not include the inserted row of data records.
  • the technical solution provided by the present application can ensure that the query result obtained by the query operation performed by the target storage node does not contain the data record by judging whether the data record is visible to the target transaction. Contains the inserted row of data records.
  • the method further includes: sending a page query response to the computing node, where the page query response includes a data record queried from at least one target page of the target storage node.
  • the target storage node by sending a page query response to the computing node, the target storage node can facilitate the computing node to know the data records queried by the target storage node.
  • a data query apparatus in a third aspect, includes various modules for executing the data query method provided in the first aspect or any optional manner of the first aspect.
  • a data query apparatus in a fourth aspect, includes various modules for executing the data query method provided in the second aspect or any optional manner of the second aspect.
  • a data query device including a memory and a processor
  • the memory is used to store computer programs
  • the processor is configured to execute the computer program stored in the memory to implement the data query method provided in the first aspect or any optional manner of the first aspect; or, to implement the second aspect or any optional manner of the second aspect The data query method provided by the selection method.
  • a computer-readable storage medium is provided, and a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the first aspect or any optional manner of the first aspect is provided.
  • the data query method or, implement the data query method provided by the second aspect or any optional manner of the second aspect.
  • a seventh aspect provides a computer program product comprising instructions, when the computer program product runs on a computer, the computer is made to execute the data query method provided by the first aspect or any optional manner of the first aspect , or, execute the data query method provided by the second aspect or any optional manner of the second aspect.
  • a chip in an eighth aspect, includes a programmable logic circuit and/or program instructions, when the chip is running, it is used to implement the data query provided by the first aspect or any optional manner of the first aspect The method, or, implements the data query method provided by the second aspect or any optional manner of the second aspect.
  • a database system in a ninth aspect, includes: a computing node and at least one storage node connected to the computing node, the computing node includes the data query device provided in the third aspect, and the storage node includes The data query apparatus provided in the above fourth aspect; or, at least one of the computing node and the storage node is the data query apparatus provided in the above fifth aspect.
  • the data query method and device, and the database system provided by the present application include a computing node and at least one storage node.
  • the computing node When receiving a data query request carrying query conditions, the computing node first obtains a query code according to the query conditions, and then The query code is sent to at least one target storage node. After receiving the query code, each target storage node performs data query on the target page in the target storage node by executing the query code. Since data query can be performed without the computing node reading pages from the target storage node, the resource overhead of data query can be reduced, the data query efficiency can be improved, and the performance of the database system can be improved.
  • the solution provided by the present application does not require the target storage node to generate query codes, the number of times of interpretation of query conditions is less, and the execution speed of data query is faster.
  • FIG. 1 is a schematic diagram of an application environment of a database system involved in a data query method provided by an embodiment of the present application
  • FIG. 2 is a flowchart of a data query method provided by an embodiment of the present application.
  • FIG. 3 is a flowchart of another data query method provided by an embodiment of the present application.
  • FIG. 4 is a flowchart of determining a target storage node provided by an embodiment of the present application.
  • FIG. 5 is a schematic diagram of a data record provided by an embodiment of the present application.
  • FIG. 6 is a flowchart of a data query in a target page provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of a logical structure of a data query apparatus provided by an embodiment of the present application.
  • FIG. 8 is a schematic diagram of a logical structure of another data query apparatus provided by an embodiment of the present application.
  • FIG. 9 is a schematic diagram of a hardware structure of a data query apparatus provided by an embodiment of the present application.
  • Relational database A database that uses a relational model to organize data, storing data in the form of rows and columns. Each relational model can be called a relational table. According to different storage principles, relational databases can be divided into distributed relational databases and non-distributed relational databases.
  • Tablespace is the logical division of relational databases, a tablespace can only belong to one database. All database objects (including tables, indexes, views, charts, default values, rules, triggers, users and functions, etc.) are stored in the specified tablespace, but the tablespace mainly stores tables, so it is called Table space, each table space has a unique identity document (ID), which is referred to as an identity for short.
  • ID unique identity document
  • the storage medium is a non-volatile computer-readable storage medium, such as a magnetic disk, a read-only memory, or an optical disk.
  • Transaction It is a unit that maintains the consistency and integrity of database data, and it has the characteristics of "all success or all failure".
  • the database is not responsible for the consistency and integrity of its data until a transaction is committed. However, once the transaction is committed, the database must ensure the consistency and integrity of the data. Simply put, once the transaction is committed, the data cannot be lost.
  • transaction data that is, data involved in transaction execution
  • Page Also known as page, data page, physical page or physical page, a page is the basic unit of data storage in a database system. For example, in a database system where the page size is 8 kilobytes (KB), there are 128 pages per megabyte in the database system.
  • Transaction log In a relational database, it is used to record the modification of data involved in the execution of a transaction.
  • the transaction log is a set of files that can be stored directly on disk, which is usually a sequentially stored physical log.
  • the transaction log is used to record the historical modification information (usually physical modification information) of the page. For example, a transaction log is used to record historical modification information on the 9th byte (byte) to the 13th byte on a page.
  • the corresponding transaction data has changed in the transaction log and the buffer pool, but the corresponding page has not been recorded in the storage medium (such as disk), which is different from the buffer pool. Pages with different record content are called dirty pages. Based on the buffer pool data, the process of recording dirty pages to the storage medium is called dirtying. If there are some dirty pages in the database that are not written to the storage medium, a failure occurs, such as a crash, and the data in the buffer pool will be lost, so the transaction log stored in the storage medium is needed to restore the buffer pool. data. Therefore, the main function of the transaction log is to ensure the consistency and integrity of the data in the relational database.
  • Log sequence number is an incrementing integer number representing the total number of bytes written to the transaction log by the transaction. Since it is always increasing, LSN can be used as a unique identifier for transaction data written at different times. LSN is mainly used for data recovery when the database fails.
  • Log first (write ahead log, WAL) principle also known as the log first principle, that is, before modifying the page data, first write the data into the transaction log according to the execution order of the transaction, then modify the page data, and then put the transaction log on the disk.
  • the data query method provided in the embodiment of the present application can be applied to a database system, and the database system can be a relational database system, and the database system can be a distributed database system.
  • the database system may be a distributed distributed relational database.
  • FIG. 1 shows a schematic diagram of an application environment of the database system 10 involved in the data query method provided by the embodiment of the present application.
  • the database system 10 may be a computer device or a computer cluster composed of a plurality of computer devices, and the computer device may be a server.
  • the database system 10 includes a database management system (DBMS) (not shown in FIG. 1 ) and at least one database (DB) (not shown in FIG. 1 ).
  • DBMS database management system
  • DB database management system
  • the client 20 can transparently operate the database through the database management system, and the data in the database is managed by the database management system.
  • the database can be a relational database.
  • the database system 10 includes: a computing node (also called a query engine, a structured query language (SQL) engine or a database engine) 101 and a plurality of storage nodes 102 (shown in FIG. 1 ) four), the plurality of storage nodes 102 are all connected to the computing node 101, the computing node 101 is used to perform data processing by executing transactions, and the storage node 102 is used to store data.
  • the storage node 102 includes at least one page, and data is stored in the page. Illustratively, the page includes multiple rows of data records.
  • the computing node 101 may be a single node, or a designated storage node among multiple storage nodes 102, or a node selected from multiple storage nodes 102, and the computing node 101 may be a A computer device or a computer cluster composed of a plurality of computer devices, the computer device may be a server, for example, the computing node 101 is a server or a server cluster composed of a plurality of servers.
  • each storage node 102 may be a computer device or a computer cluster composed of multiple computer devices.
  • each storage node is a set minimum processing unit of the database system; for example, each storage node may be a virtual machine or a container in a computer device, which An application instance or a database execution process that manages and/or stores data.
  • the client 20 can send a data query request carrying query conditions to the computing node 101.
  • the computing node 101 After receiving the data query request, the computing node 101 communicates with the storage node 102 according to the query conditions carried in the data query request. interact to query data.
  • the data query request may be an SQL statement.
  • the implementation environment shown in FIG. 1 is only used for example, and is not used to limit the technical solutions of the embodiments of the present application.
  • the database system may include multiple computing nodes, each computing node is connected to at least one storage node, each computing node and the storage node connected to it belong to the same database, and each computing node is used for interacting with the storage node connected to it. Perform data query, which is not limited in this embodiment of the present application.
  • a computing node in the database system reads pages from multiple storage nodes in the database system, and performs data query on the read pages according to the query conditions .
  • the computing node needs to read pages from multiple storage nodes to perform data query, the data query resource overhead is high and the data query efficiency is low, which easily affects the performance of the database system.
  • the computing node in the database system sends a page query request carrying the query condition to a storage node in the database system, and each storage node according to the received page
  • the query condition carried in the query request generates a query code
  • each storage node that receives a page query request needs to generate a query code according to the query conditions (that is, each storage node that receives a page query request needs to interpret the query conditions, and different storage nodes need to interpret the query conditions.
  • the interpretation process of the conditions is the same), which leads to a large resource overhead of the storage node and low data query efficiency, and when the query conditions are complex, the interpretation process of the query conditions is complicated, and it is easier to increase the resource overhead of the storage node. Reduce data query efficiency and affect the performance of the database system.
  • the embodiments of the present application provide a data query method and device, and a database system.
  • a computing node receives a data query request carrying a query condition
  • the query code is acquired, and the query code is sent to at least one target storage node, and each target storage node performs data query on the target page in the target storage node by executing the received query code. Since the data query can be performed without the computing node reading pages from the target storage node, the resource overhead of the data query can be reduced, the data query efficiency can be improved, and the performance of the database system can be improved.
  • the target storage node can perform data query without generating query code, which helps to reduce the resource overhead of the target storage node. , to improve data query efficiency.
  • FIG. 2 shows a flowchart of a data query method provided by an embodiment of the present application, and the data query method can be applied to the implementation environment shown in FIG. 1 .
  • the method may include the following steps:
  • Step 201 The client sends a data query request carrying query conditions to the computing node.
  • the client can run on a computer device.
  • the client can input query conditions through the interface provided by the client.
  • the client can generate a data query request carrying the query conditions according to the query conditions input by the user, and send the query to the query conditions.
  • the computing node in the database system sends the data query request.
  • the data query request may be an SQL statement
  • the table tb1 can be an employee information table of a company, and the table tb1 includes a name field, an age field, a gender field, etc., then the field A1 can be the name field in the table tb1, and the age field in the table tb1 Can be A2 and gender field can be A3.
  • the computing node in the database system may be a computer device or a node in the computer device (for example, a virtual machine or a container). If the computing node is a computer device, the client may run on the computer device. On the computing node, if the computing node is a node in a computer device, the client can run on the computer device where the computing node is located, or the client can run on a computer device different from the computing node. The embodiment does not limit this.
  • Step 202 The computing node obtains the query code according to the query condition carried in the data query request.
  • the computing node can receive the data query request, parse the data query request to obtain query conditions, and obtain query codes according to the query conditions.
  • the data query request may be an SQL statement
  • the computing node may have an SQL parser, and the computing node obtains query conditions by parsing the data query request through the SQL parser.
  • the computing node supports code generation (codegen) technology, so that the computing node can have a code generation function, and the computing node can generate the query code based on the code generation technology according to the query condition. That is, the computing node interprets the query condition as a query code based on the code generation technology.
  • code generation codegen
  • the computing node interprets the query condition as a query code based on the code generation technology.
  • the computing node includes a code generator (or referred to as a code generation module), and the code generator is configured to generate and output the query code based on the code generation technology according to the query condition.
  • the computing node can input the query condition into the code generator, so that the code generator can generate and output a query code according to the query condition, and the computing node can obtain the query code output by the code generator. That is, the computing node interprets the query condition as a query code through the code generator.
  • the query code may be a bytecode (byte code) code.
  • a bytecode is a binary file that contains an executable program, which consists of a sequence of opcode/data pairs.
  • Bytecode is an intermediate code that is more abstract than machine code and requires a translator to convert intermediate code into machine code. Regardless of the hardware environment, bytecode is mainly used to implement specific software operations and software environments. The implementation of bytecode is implemented by compilers and virtual machines. Bytecode is usually not readable like source code, but a Series encode numeric constants, references, instructions, etc.
  • Step 203 The computing node sends a query code to at least one target storage node.
  • the computing node After acquiring the query code, the computing node can send the query code to at least one target storage node in the database system.
  • the at least one target storage node may be all storage nodes connected to the computing node in the database system, or part of the storage nodes connected to the computing node in the database system, which is not limited in this embodiment of the present application.
  • Step 204 The target storage node performs data query on the target page in the target storage node by executing the query code.
  • the target storage node can receive the query code sent by the computing node, and perform data query on the target page in the target storage node by executing the query code.
  • the target page may be all pages in the target storage node, or the target page is a part of the pages in the target storage node, which is not limited in this embodiment of the present application.
  • the target page includes at least one row of data records
  • the target storage node can execute the query code for each row of data records in the target page to determine whether the data record satisfies the query condition until the target page is traversed. After traversing all the data records in the target storage node, the target storage node determines all the data records that meet the query conditions as the queried data records.
  • Step 205 The target storage node sends a page query response to the computing node, where the page query response includes the data record queried by the target storage node from the target page.
  • the target storage node After the target storage node queries the data record from the target page of the target storage node, it generates a page query response according to the queried data record, and sends the page query response to the computing node.
  • the page query response may include data records queried by the target storage node from the target page, for example, the page query response includes all data records queried by the target storage node.
  • Step 206 The computing node sends a data query response to the client according to the page query response sent by the at least one target storage node, where the data query response includes the data records queried by the at least one target storage node.
  • the computing node can receive the page query response sent by the target storage node, and parse the page query response to obtain the data record queried by the target storage node.
  • the computing node parses the page query response sent by the at least one target storage node to obtain the at least one page query response.
  • the data records queried by the target storage node generate a data query response according to the data records queried by the at least one target storage node, and send the data query response to the client, where the data query response includes the data queried by the at least one target storage node. data record.
  • Step 207 The client determines the queried data record according to the data query response sent by the computing node.
  • the client can receive the data query response sent by the computing node, and the client parses the data query response to obtain the queried data record.
  • the client can display the queried data record, or apply the queried data record (for example, use the queried data record to perform data processing, etc.), this application The embodiments are not repeated here.
  • the data query method can perform data query without the need for a computing node to read pages from a target storage node, thereby helping to reduce the resource overhead of data query, improve data query efficiency, and thereby improve The performance of the database system.
  • the query code is sent by the computing node to the target storage node, rather than obtained by the target storage node through conditional interpretation, the target storage node can perform data query without generating query code, which helps to reduce the resource overhead of the target storage node. , to improve data query efficiency.
  • the query code can be obtained only by interpreting the query conditions by the computing node, and each target storage node only needs to perform data query according to the query code sent by the computing node. Less, the data query executes faster.
  • the at least one target storage node may be all storage nodes connected to the computing node, or a part of the storage nodes connected to the computing node.
  • the at least one target storage node may be a query condition carried by the computing node according to the received data query request from and the computing node. is determined among all the storage nodes connected to the computing node, as an optional implementation manner, before the above step 203, the method further includes: the computing node determines at least one storage node connected to the computing node according to the query condition. Target storage node.
  • the storage node includes at least one page, and each page includes at least one row of data records, so that the target page in the target storage node includes at least one row of data records.
  • the computing node may also send a page query request to the at least one target storage node, where the page query request carries page information and transaction information of currently active transactions in the computing node.
  • the page information indicates a target page in the target storage node, and the currently active transaction is a transaction that is being executed on the computing node when the computing node sends the page query request.
  • the target storage node can determine the target page in the target storage node according to the page information carried in the page query request, and, according to the transaction information of the currently active transaction carried in the page query request, execute the query code in the target storage node.
  • the data query is performed by row in the target page of the node.
  • FIG. 3 shows a flowchart of another data query method provided by an embodiment of the present application, and the data query method can be applied to the implementation environment shown in FIG. 1 .
  • the method may include the following steps:
  • Step 301 The client sends a data query request carrying query conditions to the computing node.
  • Step 302 The computing node obtains the query code according to the query condition carried in the data query request.
  • Step 303 The computing node determines at least one target storage node from the storage nodes connected to the computing node according to the query condition.
  • the computing node After receiving the data query request, the computing node parses the data query request to obtain query conditions, and according to the query conditions, determines at least one target storage node among the storage nodes connected to the computing node.
  • the query condition may include at least one field data to be queried, and the computing node may determine at least one target storage node among storage nodes connected to the computing node according to the field data to be queried in the query condition .
  • FIG. 4 shows a flowchart of a computing node determining a target storage node provided by an embodiment of the present application.
  • the method includes the following sub-steps:
  • Sub-step 3031 Determine at least one target page where the at least one field data to be queried is located according to the first mapping relationship between the field data and the page, where the first mapping relationship is used to indicate the page where the field data is located.
  • each page in the storage node includes at least one row of data records, and each row of data records includes at least one field data
  • the computing node can maintain a first mapping relationship between field data and pages, and the first mapping The relationship is used to indicate the page where the field data is located, and the first mapping relationship may be established according to the field data and the page where the field data is located.
  • the first mapping relationship may be an index relationship.
  • FIG. 5 shows a schematic diagram of a data record provided by an embodiment of the present application.
  • the data record may be a row of data records, and the data record includes field data 1 , field data 2 , and field data 3 .
  • the data record may be a row of data records in the table tb1 described in step 201
  • the field data 1 may be the value in the name field A1 in the table tb1
  • the field data 2 may be the age field in the table tb1
  • the value in A2 the field data 3 can be the value in the gender field A3 in table tb1.
  • the data record further includes transaction information, which may be a transaction ID, and the transaction information indicates a transaction for performing operations (eg, modification, mapping, etc.) on the data record.
  • the computing node can determine the target page where each to-be-queried field data in the at least one to-be-queried field data in the query condition is located according to the first mapping relationship between the field data and the page maintained by itself, so as to determine at least one target page .
  • the computing node queries the first mapping relationship according to the field data to be queried, obtains a page corresponding to the field data to be queried, and obtains the page corresponding to the field data to be queried.
  • a page corresponding to the field data to be queried in a mapping relationship is determined as the target page where the field data to be queried is located, so as to determine at least one target page where the at least one field data to be queried is located.
  • the computing node simultaneously queries the first mapping relationship according to the at least one field data to be queried, and determines a page in the first mapping relationship that simultaneously corresponds to the at least one field data to be queried as the at least one field data to be queried.
  • At least one target page where the field data is queried is not limited in this embodiment of the present application.
  • what is recorded in the first mapping relationship may be the mapping relationship between field data and page identifiers (such as page IDs), each page identifier indicates a page, and the computing node queries the first mapping relationship according to the field data to be queried to obtain. is the page identifier corresponding to the field data to be queried, and the computing node determines the page indicated by the page identifier corresponding to the field data to be queried as the target page.
  • each field data may be located in one page, and the same field data may be located in different pages, so the calculation node determines each field data to be queried according to the first mapping relationship.
  • Sub-step 3032 Determine the storage node where each target page is located according to the second mapping relationship between the page and the storage node, where the second mapping relationship indicates the storage node where the page is located.
  • the computing node may maintain a second mapping relationship between the page and the storage node, where the second mapping relationship is used to indicate the storage node where the page is located, and the second mapping relationship may be based on the page and the storage node where the page is located.
  • the second mapping relationship may be an index relationship.
  • the computing node may determine, according to the second mapping relationship, the storage node where each target page of the at least one target page described in sub-step 3031 is located.
  • the computing node queries the second mapping relationship according to the target page to obtain a storage node corresponding to the target page, and the second mapping relationship corresponds to the target page.
  • the corresponding storage node is determined as the storage node where the target page is located.
  • what is recorded in the second mapping relationship may be a mapping relationship between page identifiers (eg, page IDs) and storage node identifiers (eg, storage node IDs), and each storage node identifier indicates a storage node.
  • the computing node can query the second mapping relationship according to the identifier of the target page to obtain the storage node identifier corresponding to the identifier of the target page, and determine the storage node indicated by the storage node identifier corresponding to the identifier of the target page as the location where the target page is located. storage node.
  • each page may be located in one storage node, and multiple pages may exist in the same storage node, so the location of each target page determined by the computing node according to the second mapping relationship is located.
  • Sub-step 3033 Determine the storage node where the at least one target page is located as the at least one target storage node.
  • the computing node determines the storage node where the at least one target page is located as the at least one target storage node. It can be understood that the number of the at least one target storage node is less than or equal to the number of the one less target page, and if the number of the at least one target storage node is equal to the number of the at least one target page, it means that each target page is located in a storage In the node, if the number of the at least one target storage node is less than the number of the at least one target page, it means that there are at least two target pages located in one storage node.
  • Step 304 The computing node sends a query code to the at least one target storage node.
  • step 304 For the implementation process of this step 304, reference may be made to the foregoing step 203, which will not be repeated here.
  • Step 305 The computing node sends a page query request to the at least one target storage node, where the page query request carries at least one of page information and transaction information of a currently active transaction in the computing node.
  • the computing node After the computing node determines at least one target storage node, it can generate a page query request, and send a page query request to the at least one target storage node, where the page query request can carry page information and transaction information of currently active transactions in the computing node. At least one of, the page information indicates the target page in the target storage node, and the current active transaction is the transaction that is being executed on the computing node when the computing node sends the page query request, that is, the transaction that is currently active .
  • the page information may be a page identifier
  • the transaction information may be a transaction identifier.
  • the page query request carries page information and transaction information of currently active transactions in the computing node.
  • the computing node may generate a page query request for the target storage node according to the current active transaction in the computing node and the target page on each target storage node, and send the page query request to the target storage node.
  • the page query request generated by the computing node for each target storage node carries the transaction information of the current active transaction in the computing node and the page information of the target page on the target storage node. It is easy to understand that the computing node generates the transaction information for each target storage node.
  • the page information carried in the page query request can be different.
  • a transaction identifier may be assigned to the transaction, and the transaction identifier may be represented by a numerical value, and the computing node usually assigns transaction identifiers to transactions in ascending order of numerical values.
  • the page query request may carry a first transaction identifier and a second transaction identifier, and the value of the first transaction identifier may be the transaction identifier of the multiple transactions.
  • the maximum value among the numerical values, and the numerical value of the second transaction identifier may be the minimum value among the numerical values of the transaction identifiers of the multiple transactions.
  • the at least one target storage node is a storage node S1 and a storage node S2 (for example, the storage node S1 and the storage node S2 may be any two storage nodes in FIG. 1 )
  • the target page on the storage node S1 is Page 11 and page 12
  • the target page on the storage node S2 is page 21
  • the identifier of page 11 is ID-p11
  • the identifier of page 12 is ID-p12
  • the identifier of page 21 is ID-p21
  • the identifier of the first transaction is ID-Wmax
  • the second transaction identifier is ID-Wmin
  • the page query request generated by the computing node for storage node S1 carries ID-Wmax, ID-Wmin, ID-p11 and ID-p12
  • the page query request generated by the computing node for storage node S2 carries ID-Wmax, ID-Wmin, ID-p11 and ID-p12.
  • the page query request carries ID-Wmax, ID-Wmin and ID
  • this embodiment of the present application does not limit the execution order of this step 305 and the foregoing step 304 .
  • This step 305 and the aforementioned step 304 may be performed simultaneously.
  • the computing node may carry the query code in the page query request and send it to the target storage node; or, the computing node may send the page query request to the same target storage node in batches, The computing node sends the query code to the target storage node in the first page query request sent to each target storage node.
  • step 304 may be performed first, and then step 305 may be performed, that is, the computing node first sends the query code to the target storage node, and then sends the page query request to the target storage node.
  • step 305 may be performed first, and then step 304 may be performed, that is, the computing node first sends a page query request to the target storage node, and then sends a query code to the target storage node, which is not limited in this embodiment of the present application.
  • Step 306 The target storage node determines a target page in the target storage node according to the page information carried in the page query request.
  • the target storage node can receive the page query request sent by the computing node, and then the target storage node parses the page query request to obtain the page information carried by the page query request , and the transaction information of the currently active transaction carried in the page query request.
  • the target storage node may determine the target page in the target storage node according to the page information carried in the page query request.
  • the target storage node determines the page indicated by the page information carried in the page query request in the page of the target storage node, and determines the page indicated by the page information carried in the page query request as the target page.
  • the target storage node may be the storage node S1
  • the computing node sends a page query request to the storage node S1 carrying ID-Wmax, ID-Wmin, ID-p11 and ID-p12
  • the storage node S1 parses the page query request to obtain Page identification ID-p11 and ID-p12, and transaction information ID-Wmax and ID-Wmin of the current active transaction
  • the storage node S1 will store the storage node S1
  • the page 11 indicated by ID-p11 and the page indicated by ID-p12 12 are identified as target pages.
  • the target storage node is the storage node S2
  • the computing node sends a page query request to the storage node S2 carrying ID-Wmax, ID-Wmin and ID-p21
  • the storage node S2 parses the page query request to obtain the page identifier ID- p21, and the transaction information ID-Wmax and ID-Wmin of the current active transaction, the storage node S2 determines the page 21 indicated by the ID-p21 in the storage node S2 as the target page.
  • the target page can be read.
  • a page is the basic unit of data storage in a database system, so reading a target page by a target storage node can be understood as the target storage node reading data records in the target page according to page units.
  • Step 307 the target storage node performs a row-by-row data query on the target page of the target storage node by executing the query code according to the transaction information of the currently active transaction carried in the page query request.
  • the target storage node can receive the query code, and then the target storage node executes the query code according to the transaction information of the currently active transaction carried by the page query request, and executes the query code in the target storage node.
  • the data query is performed by row in the target page of the node.
  • the target page includes at least one row of data records
  • the target storage node can parse the target page to obtain each row of data records in the target page, and for each row of data records in the target page, the target storage node. Nodes perform data queries by executing processing steps.
  • each row of data records in the target page includes transaction information and at least one field data, and the transaction information in each row of data records indicates a transaction for operating the data record. Therefore, as described in the embodiments of the present application
  • the processing steps can be shown in Figure 6.
  • FIG. 6 shows a flowchart of data query in a target page provided by an embodiment of the present application. Referring to FIG. 6 , the method may include the following sub-steps:
  • Sub-step 3071 according to the transaction information in the data record and the transaction information of the currently active transaction, determine whether the data record is visible to the target transaction on the computing node. If yes, go to sub-step 3072 to sub-step 3074; if not, go to step 3075.
  • the transaction information in the data record may be a transaction identifier, for example, a value of the transaction identifier, and the target transaction may be a transaction for processing the data query request described in step 301 on the computing node.
  • the transaction information of the currently active transaction carried in the page query request may include a first transaction identifier and a second transaction identifier
  • the value of the first transaction identifier may be the value of multiple transactions currently in an active state in the computing node.
  • the maximum value among the values of the transaction identifiers, the value of the second transaction identifier may be the minimum value among the values of the transaction identifiers of the multiple transactions
  • the target storage node may, according to the transaction information in each row of data records, the first transaction The identifier and the second transaction identifier are used to determine whether the data record is visible to the target transaction on the computing node.
  • the transaction information in the data record may be ID-WX, the first transaction identifier is ID-Wmax, and the second transaction identifier is ID-Wmin.
  • the target storage node can determine whether the value of ID-WX is greater than the value of ID-Wmax, and determine whether the value of ID-WX is less than the value of ID-Wmin; if the value of ID-WX is greater than the value of ID-Wmax, Then the data record is invisible to the target transaction; if the value of ID-WX is less than the value of ID-Wmin, the data record is visible to the target transaction; if the value of ID-WX is between the value of ID-Wmin and ID -Wmax value, the target storage node can judge whether the ID-WX value is equal to the specified value between the ID-Wmin value and ID-Wmax value, if the ID-WX value is equal to the ID- The specified value between the value of Wmin and the value of ID-Wmax, the data record is invisible to the target transaction, if
  • Sub-step 3072 Execute the query code on the data record to determine whether the data record satisfies the query condition. If the data record meets the query condition, execute sub-step 3074; if the data record does not meet the query condition, execute sub-step 3074.
  • the target storage node determines in sub-step 3071 that the data record is visible to the target transaction, the target storage node executes the query code for the data record to determine whether the data record satisfies the query condition.
  • the target storage node inputs the data record into the query code as an input parameter of the query code, executes the query code, and determines whether the data record satisfies the query condition according to the indication information output by the query code.
  • the indication information output by the query code may be "Yes” or “No”, if the indication information output by the query code is "Yes”, the target storage node determines that the data record satisfies the query condition, if the query code outputs The indication information is "No", the target storage node determines that the data record does not meet the query conditions.
  • the indication information output by the query code may also be other indication information.
  • the indication information output by the query code may also be "Y" or "N", where "Y" indicates that the input data record meets the query condition, and "N" indicates that the input data record does not meet the query condition. This is not limited.
  • Sub-step 3073 Determine the data record as the queried data record.
  • the target storage node determines the data record as the queried data record.
  • Sub-step 3074 do not determine the data record as the queried data record.
  • the target storage node determines in sub-step 3072 that the data record does not satisfy the query condition, the target storage node does not determine the data record as the queried data record.
  • Sub-step 3075 skip the data record.
  • the target storage node determines in sub-step 3071 that the data record is not visible to the target transaction, the target storage node skips the data record, that is, the target storage node does not execute query code for the data record.
  • Step 308 The target storage node sends a page query response to the computing node, where the page query response includes the data record of the target storage node queried from the target page.
  • step 308 For the implementation process of this step 308, reference may be made to the foregoing step 205, which will not be repeated here.
  • the page query response sent by the target storage node to the computing node may also include data records that are invisible to the target transaction, which is not limited in this embodiment of the present application.
  • Step 309 The computing node sends a data query response to the client according to the page query response sent by the at least one target storage node, where the data query response includes the data records queried by the at least one target storage node.
  • step 309 For the implementation process of this step 309, reference may be made to the foregoing step 206, which will not be repeated here.
  • the target storage node can process the data records that are invisible to the target transaction carried in the page query response sent by the at least one target storage node, and the computing node sends the data records to the client.
  • the data query response includes a data record queried by the at least one target storage node.
  • the data query response may also include a data record obtained by processing a data record that is invisible to the target transaction by the computing node. Not limited.
  • Step 310 The client determines the queried data record according to the data query response sent by the computing node.
  • step 310 For the implementation process of this step 310, reference may be made to the foregoing step 207, which will not be repeated here.
  • the data records determined by the client may include data records queried by at least one target storage node, and data records obtained by processing data records that are invisible to the target transaction by the computing node , which is not limited in the embodiments of the present application.
  • the data query method can perform data query without the need for a computing node to read pages from a target storage node, thereby helping to reduce the resource overhead of data query, improve data query efficiency, and thereby improve The performance of the database system.
  • the query code is sent by the computing node to the target storage node, rather than obtained by the target storage node through conditional interpretation, the target storage node can perform data query without generating query code, which helps to reduce the resource overhead of the target storage node. , to improve data query efficiency.
  • the query code can be obtained only by interpreting the query conditions by the computing node, and each target storage node only needs to perform data query according to the query code sent by the computing node. Less, the data query executes faster.
  • FIG. 7 shows a schematic diagram of a logical structure of a data query apparatus 700 provided by an embodiment of the present application.
  • the data query apparatus 700 may be applied to a computing node in a database system, such as computing node 101 in FIG. 1 .
  • the data query apparatus 700 may include, but is not limited to:
  • the obtaining module 710 is configured to obtain a query code according to the query condition when a data query request carrying the query condition is received. Wherein, the obtaining module 710 can be used to perform the aforementioned steps 202 and 302 .
  • the first sending module 720 is configured to send the query code to at least one target storage node in the database system, and each target storage node is configured to perform data query on a target page in the target storage node by executing the query code,
  • the at least one target storage node is at least one of the storage nodes connected to the computing node in the database system.
  • the first sending module 720 may be configured to perform the aforementioned step 202 and step 304 .
  • the obtaining module 710 is configured to generate the query code based on the code generation technology according to the query condition.
  • the obtaining module 710 is used for:
  • the data query apparatus 700 further includes:
  • the second sending module 730 is configured to send a page query request to the at least one target storage node, where the page query request carries at least one of page information and transaction information of a currently active transaction in the computing node, where the page information indicates the The target page, the currently active transaction is the transaction that is being executed on the computing node when the page query request is sent.
  • the second sending module 730 may be configured to perform the foregoing step 305 .
  • the query condition includes at least one field data to be queried.
  • the data query apparatus 700 further includes:
  • the first determining module 740 is configured to determine the at least one field to be queried according to the first mapping relationship between field data and pages before the first sending module 720 sends the query code to at least one target storage node in the database system At least one target page where the data is located, and the first mapping relationship is used to indicate the page where the field data is located.
  • the first determination module 740 may be used to execute the aforementioned sub-step 3031 .
  • the second determining module 750 is configured to determine the storage node where each target page is located according to the second mapping relationship between the page and the storage node, where the second mapping relationship indicates the storage node where the page is located. Wherein, the second determining module 750 may be used to perform the foregoing sub-step 3032.
  • the third determining module 760 is configured to determine the storage node where the at least one target page is located as the at least one target storage node. Wherein, the third determination module 760 may be used to execute the aforementioned sub-step 3033 .
  • the data query device provided by the embodiments of the present application can perform data query without the need for the computing node to read pages from the target storage node, thereby helping to reduce the resource overhead of data query, improve data query efficiency, and thereby improve The performance of the database system.
  • the query code is sent by the computing node to the target storage node, rather than obtained by the target storage node through conditional interpretation, the target storage node can perform data query without generating query code, which helps to reduce the resource overhead of the target storage node. , to improve data query efficiency.
  • the query code can be obtained only by interpreting the query condition by the computing node, and each target storage node only needs to perform data query according to the query code sent by the computing node. Less, the data query executes faster.
  • FIG. 8 shows a schematic diagram of a logical structure of another data query apparatus 800 provided by an embodiment of the present application.
  • the data query apparatus 800 can be applied to a target storage node in a database system, for example, the storage node 102 in FIG. 1 .
  • the data query apparatus 800 may include, but is not limited to:
  • the first receiving module 810 is configured to receive a query code sent by a computing node in the database system, where the query code is obtained by the computing node according to the query condition carried in the received data query request;
  • the query module 820 is configured to perform data query on the target page of the target storage node by executing the query code.
  • the data query apparatus 800 further includes:
  • the second receiving module 830 is configured to receive a page query request sent by the computing node, where the page query request carries at least one of page information and transaction information of a currently active transaction in the computing node, where the page information indicates the target page , the currently active transaction is the transaction that is being executed on the computing node when the page query request is sent.
  • the page query request carries page information and transaction information of the currently active transaction in the computing node
  • the query module 820 is used for:
  • the data query is performed row by row in the target page by executing the query code.
  • the target page includes at least one row of data records, each row of data records includes transaction information and at least one field data, and the transaction information in each row of data records indicates a transaction for operating the data record;
  • the query module 820 is configured to perform data query for each row of data records in the target page by executing the following processing steps; wherein, the processing steps include:
  • the transaction information in the data record and the transaction information of the currently active transaction determine whether the data record is visible to the target transaction on the computing node, and the target transaction is the transaction processing the data query request on the computing node;
  • the data record is determined as the queried data record.
  • the data query apparatus 800 further includes:
  • the sending module 840 is configured to send a page query response to the computing node, where the page query response includes a data record queried from at least one target page of the target storage node.
  • the data query device provided by the embodiments of the present application can perform data query without the need for the computing node to read pages from the target storage node, thereby helping to reduce the resource overhead of data query, improve data query efficiency, and thereby improve The performance of the database system.
  • the query code is sent by the computing node to the target storage node, rather than obtained by the target storage node through conditional interpretation, the target storage node can perform data query without generating query code, which helps to reduce the resource overhead of the target storage node. , to improve data query efficiency.
  • the query code can be obtained only by interpreting the query condition by the computing node, and each target storage node only needs to perform data query according to the query code sent by the computing node. Less, the data query executes faster.
  • FIG. 9 shows a schematic diagram of a hardware structure of a data query apparatus 900 provided by an embodiment of the present application.
  • the data query apparatus 900 may be a computer device, such as a server.
  • the data query apparatus 900 may be a computing node or a storage node, or the data query apparatus 900 includes a computing node and a storage node.
  • the data query apparatus 900 includes a processor 902 , a memory 904 , a communication interface 906 and a bus 908 , and the processor 902 , the memory 904 and the communication interface 906 are communicatively connected to each other through the bus 908 .
  • the connection between the processor 902, the memory 904 and the communication interface 906 shown in FIG. 9 is only exemplary, and during the implementation, the processor 902, the memory 904 and the communication interface 906 may also be They are communicatively connected to each other using other connections than the bus 908 .
  • the memory 904 may be used to store a computer program 9042, which may include instructions and data.
  • the memory 904 may be various types of storage media, such as random access memory (RAM), read-only memory (ROM), and nonvolatile RAM (non-volatile RAM).
  • RAM random access memory
  • ROM read-only memory
  • nonvolatile RAM non-volatile RAM
  • NVRAM nonvolatile RAM
  • programmable ROM programmable ROM, PROM
  • erasable PROM erasable PROM
  • EPROM electrically erasable PROM
  • flash memory optical memory and registers, etc.
  • the memory 904 may include hard disk and/or memory.
  • the processor 902 may be a general-purpose processor, and the general-purpose processor may be a processor that performs specific steps and/or operations by reading and executing a computer program (eg, computer program 9042 ) stored in a memory (eg, memory 904 ), A general-purpose processor may use data stored in memory (eg, memory 904 ) in performing the steps and/or operations described above.
  • a general-purpose processor may be, for example, but not limited to, a central processing unit (CPU).
  • processor 902 may also be a special purpose processor, which may be a processor specially designed to perform particular steps and/or operations, such as, but not limited to, a digital signal processor ( digital signal processor, DSP), application-specific integrated circuit (ASIC) or programmable logic device (PLD), the PLD can be a complex program logic device (complex programmable logical device, CPLD), on-site Programmable gate array (field-programmable gate array, FPGA), general array logic (generic array logic, GAL) or any combination thereof, etc.
  • the processor 902 may also be a combination of multiple processors, such as a multi-core processor.
  • the processor 902 may include at least one circuit to execute all or part of the steps of the data query method provided by the above embodiments.
  • the communication interface 906 may include an input/output (input/output, I/O) interface, a physical interface, a logical interface, and other interfaces for realizing the interconnection of devices within the data query apparatus 900, and an interface for realizing the data query apparatus 900 An interface that interconnects with other devices, such as the user equipment where the client is located.
  • the physical interface can be a gigabit Ethernet interface (gigabit Ethernet, GE), which can be used to realize the interconnection between the data query device 900 and other devices
  • the logical interface is the interface inside the data query device 900, which can be used to realize the data query device.
  • 900 internal device interconnection It is easy to understand that the communication interface 906 can be used for the data query apparatus 900 to communicate with other devices, for example, the communication interface 906 is used for information transmission and reception between the data query apparatus 900 and other devices.
  • the bus 908 may be any type of communication bus used to realize the interconnection of the processor 902, the memory 904 and the communication interface 906, such as a system bus.
  • the above-mentioned devices may be respectively arranged on chips that are independent of each other, or at least part or all of them may be arranged on the same chip. Whether each device is independently arranged on different chips or integrated on one or more chips often depends on the needs of product design.
  • the embodiments of the present application do not limit the specific implementation form of the above device.
  • the data query apparatus 900 shown in FIG. 9 is only an example. During the implementation process, the data query apparatus 900 may also include other components, which are not listed one by one herein.
  • the data query apparatus 900 shown in FIG. 9 can perform data query by executing all or part of the steps of the data query method provided by the above embodiments.
  • Embodiments of the present application provide a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, all or part of the data query method provided by the above method embodiments is implemented step.
  • the embodiments of the present application provide a computer program product containing instructions, when the computer program product runs on a computer, the computer is made to execute all or part of the steps of the data query method provided by the above method embodiments.
  • the embodiments of the present application provide a chip, the chip includes a programmable logic circuit and/or program instructions, when the chip is running, it is used to implement all or part of the steps of the data query method provided by the above method embodiments.
  • An embodiment of the present application provides a database system, where the database system includes: a computing node and at least one storage node connected to the computing node.
  • the database system may be the database system 10 shown in FIG. 1 .
  • the computing node includes the data query device 700 shown in FIG. 7
  • the storage node includes the data query device 800 shown in FIG. 8 ; or, at least one of the computing node and the storage node is shown in FIG. 9 above.
  • the data query apparatus 900 shown in the present application will not be described again in this embodiment of the present application.
  • the above-mentioned embodiments it may be implemented in whole or in part by software, hardware, firmware or any combination thereof.
  • software it may be implemented in whole or in part in the form of a computer program product comprising one or more computer instructions.
  • the computer program instructions When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated.
  • the computer may be a general purpose computer, a computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be downloaded from a website, computer, server, or data
  • the center transmits to another website site, computer, server, or data center by wire (eg, coaxial cable, optical fiber, digital subscriber line) or wireless (eg, infrared, wireless, microwave, etc.).
  • the computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, a data center, or the like that includes one or more available media integrated.
  • the usable media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media, or semiconductor media (eg, solid state drives), and the like.
  • first and second etc. are used for descriptive purposes only and should not be construed to indicate or imply relative importance.
  • the term “at least one” refers to one or more, and “plurality” refers to two or more, unless expressly limited otherwise.
  • the disclosed apparatus and the like may be implemented by other structural manners.
  • the apparatus embodiments described above are only illustrative.
  • the division of units is only a logical function division.
  • there may be other division methods for example, multiple units or components may be combined or integrated. to another system, or some features can be ignored, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical or other forms.
  • Units described as separate components may or may not be physically separated, and components described as units may or may not be physical units, and may be located in one place or distributed to multiple network devices (for example, terminal devices). )superior. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.

Landscapes

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

Abstract

本申请公开了一种数据查询方法及装置、数据库系统,属于数据库领域。该方法包括:数据库系统中的计算节点在接收到携带查询条件的数据查询请求时,根据该查询条件获取查询代码,并向该数据库系统中的至少一个目标存储节点发送该查询代码,每个目标存储节点通过执行该查询代码在该目标存储节点中的目标页面中进行数据查询。本申请有助于降低数据查询的资源开销,提高数据查询效率,从而改善数据库系统的性能。

Description

数据查询方法及装置、数据库系统 技术领域
本申请涉及数据库领域,特别涉及一种数据查询方法及装置、数据库系统。
背景技术
数据库系统(database system,DBS)包括计算节点以及与该计算节点连接的多个存储节点,计算节点用于通过执行事务来进行数据处理,存储节点用于存储数据。其中,存储节点中包括至少一个页面(page),数据存储在页面中。
目前,当数据库系统接收到携带查询条件的数据查询请求时,该数据库系统中的计算节点从该数据库系统中的多个存储节点读取页面,并根据查询条件在读取的页面中进行数据查询。但是,由于计算节点需要从多个存储节点读取页面才能进行数据查询,因此数据查询资源开销较大且数据查询效率较低,容易影响数据库系统的性能。
发明内容
本申请提供了一种数据查询方法及装置、数据库系统,有助于改善数据库系统的性能。本申请的技术方案如下:
第一方面,提供了一种数据查询方法,应用于数据库系统中的计算节点,该方法包括:
在接收到携带查询条件的数据查询请求时,根据该查询条件获取查询代码;向该数据库系统中的至少一个目标存储节点发送该查询代码,每个目标存储节点用于通过执行该查询代码在该目标存储节点中的目标页面中进行数据查询,该至少一个目标存储节点是该数据库系统中与该计算节点连接的存储节点中的至少一个。
本申请提供的技术方案,由于计算节点根据查询条件获取查询代码后向目标存储节点发送该查询代码,该目标存储节点通过执行该查询代码在该目标存储节点中的目标页面中进行数据查询,因此无需该计算节点从目标存储节点中读取页面就能进行数据查询,有助于降低数据查询的资源开销,提高数据查询效率,从而改善数据库系统的性能。并且本申请提供的方案无需目标存储节点生成查询代码,对查询条件的解释次数较少,数据查询的执行速度较快。
可选地,根据该查询条件获取查询代码,包括:根据该查询条件,基于代码生成技术生成该查询代码。
本申请提供的技术方案,计算节点可以支持代码生成技术,基于该代码生成技术生成查询代码,从而便于该计算节点获取该查询代码。
可选地,根据该查询条件获取查询代码,包括:将该查询条件输入代码生成器,该代码生成器用于根据该查询条件基于代码生成技术生成查询代码并输出;获取代码生成器输出的该查询代码。
本申请提供的技术方案,计算节点中可以具有代码生成器,计算节点可以通过该代码生成器基于代码生成技术生成查询代码,从而便于该计算节点获取该查询代码。
可选地,该方法还包括:向该至少一个目标存储节点发送页面查询请求,该页面查询请求携带页面信息和该计算节点中的当前活跃事务的事务信息中的至少一种,该页面信息指示该目标页面,该当前活跃事务为发送该页面查询请求时该计算节点上正在执行的事务。
本申请提供的技术方案,计算节点通过向目标存储节点发送页面查询请求,可以便于该目标存储节点根据该计算节点中的当前活跃事务的事务信息,在该目标存储节点的目标页面进行数据查询,且有助于提高数据查询的准确性。
可选地,该查询条件包括至少一个待查询字段数据;在向该数据库系统中的至少一个目标存储节点发送查询代码之前,该方法还包括:根据字段数据与页面的第一映射关系,确定该至少一个待查询字段数据所在的至少一个目标页面,该第一映射关系用于指示字段数据所在的页面;根据页面与存储节点的第二映射关系,确定每个目标页面所在的存储节点,该第二映射关系指示页面所在的存储节点;将该至少一个目标页面所在的存储节点确定为该至少一个目标存储节点。
本申请提供的技术方案,该第一映射关系和该第二映射关系均可以是索引关系,该第一映射关系和该第二映射关系均可以由计算节点维护,有助于该计算节点根据该第一映射关系确定待查询字段数据所在的目标页面,以及根据该第二映射关系确定该目标页面所在的存储节点,从而确定目标存储节点。
第二方面,提供了一种数据查询方法,应用于数据库系统中的目标存储节点,该方法包括:接收数据库系统中的计算节点发送的查询代码,该查询代码是该计算节点根据接收到的数据查询请求携带的查询条件获取的;通过执行该查询代码在该目标存储节点的目标页面中进行数据查询。
本申请提供的技术方案,由于无需计算节点从目标存储节点中读取页面就能进行数据查询,有助于降低数据查询的资源开销,提高数据查询效率,从而改善数据库系统的性能。并且无需目标存储节点生成查询代码,对查询条件的解释次数较少,数据查询的执行速度较快。
可选地,该方法还包括:接收该计算节点发送的页面查询请求,该页面查询请求携带页面信息和该计算节点中的当前活跃事务的事务信息中的至少一种,该页面信息指示该目标页面,该当前活跃事务为发送该页面查询请求时该计算节点上正在执行的事务。
可选地,该页面查询请求携带页面信息和该计算节点中的当前活跃事务的事务信息;通过执行该查询代码在该目标存储节点的目标页面中进行数据查询,包括:根据该页面查询请求携带的页面信息在该目标存储节点中确定目标页面;根据该页面查询请求携带的当前活跃事务的事务信息,通过执行该查询代码在该目标页面中按行进行数据查询。
本申请提供的技术方案,目标存储节点通过接收计算节点发送的页面查询请求,可以便于该目标存储节点根据该计算节点中的当前活跃事务的事务信息,在该目标存储节点的目标页面进行数据查询,且有助于提高数据查询的准确性。
可选地,该目标页面包括至少一行数据记录,每行数据记录包括事务信息和至少一个字段数据,每行数据记录中的事务信息指示对该数据记录进行操作的事务;根据该页面查询请求携带的当前活跃事务的事务信息,通过执行查询代码在该目标页面中按行进行数据查询,包括:对于该目标页面中的每行数据记录,通过执行下述处理步骤进行数据查询;其中,该处理步骤包括:根据该数据记录中的事务信息和该当前活跃事务的事务信息,判断该数据记 录对该计算节点上的目标事务是否可见,该目标事务是该计算节点上处理该数据查询请求的事务;如果该数据记录对该目标事务可见,针对该数据记录执行该查询代码,以确定该数据记录是否满足该查询条件;如果该数据记录满足该查询条件,将该数据记录确定为查询出的数据记录。
本申请提供的技术方案,目标存储节点通过判断数据记录对目标事务是否可见,以及如果该数据记录对该目标事务可见,则针对该数据记录执行该查询代码,这样有助于提高数据查询的准确性。例如,计算节点在向目标存储节点发送页面查询请求之后,计算节点通过执行事务对目标存储节点中的某行数据记录进行了插入操作(此过程中目标存储节点仍然在进行数据查询),则目标存储节点执行查询操作得到的查询结果中不应该包含插入的该行数据记录,本申请提供的技术方案通过判断数据记录对目标事务是否可见,可以保证目标存储节点执行查询操作得到的查询结果中不包含插入的该行数据记录。
可选地,该方法还包括:向该计算节点发送页面查询响应,该页面查询响应包括从该目标存储节点的至少一个目标页面查询出的数据记录。
本申请提供的技术方案,目标存储节点通过向计算节点发送页面查询响应,可以便于该计算节点获知该目标存储节点查询出的数据记录。
第三方面,提供了一种数据查询装置,该数据查询装置包括用于执行如上述第一方面或第一方面的任一可选方式提供的数据查询方法的各个模块。
第四方面,提供了一种数据查询装置,该数据查询装置包括用于执行如上述第二方面或第二方面的任一可选方式提供的数据查询方法的各个模块。
第五方面,提供了一种数据查询装置,包括存储器和处理器;
该存储器用于存储计算机程序;
该处理器用于执行该存储器中存储的计算机程序以实现行如第一方面或第一方面的任一可选方式提供的数据查询方法;或者,实现如第二方面或第二方面的任一可选方式提供的数据查询方法。
第六方面,提供了一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,该计算机程序被处理器执行时实现如第一方面或第一方面的任一可选方式提供的数据查询方法,或者,实现如第二方面或第二方面的任一可选方式提供的数据查询方法。
第七方面,提供了一种包含指令的计算机程序产品,当该计算机程序产品在计算机上运行时,使得该计算机执行如第一方面或第一方面的任一可选方式所提供的数据查询方法,或者,执行如第二方面或第二方面的任一可选方式所提供的数据查询方法。
第八方面,提供了一种芯片,该芯片包括可编程逻辑电路和/或程序指令,当该芯片运行时用于实现如第一方面或第一方面的任一可选方式所提供的数据查询方法,或者,实现如第二方面或第二方面的任一可选方式所提供的数据查询方法。
第九方面,提供了一种数据库系统,该数据库系统包括:计算节点以及与该计算节点连接的至少一个存储节点,该计算节点包括如上述第三方面所提供的数据查询装置,该存储节点包括如上述第四方面所提供的数据查询装置;或者,该计算节点和该存储节点中的至少一个为上述第五方面所提供的数据查询装置。
本申请提供的技术方案带来的有益效果是:
本申请提供的数据查询方法及装置、数据库系统,该数据库系统包括计算节点和至少一 个存储节点,该计算节点在接收到携带查询条件的数据查询请求时,首先根据该查询条件获取查询代码,然后向至少一个目标存储节点发送该查询代码,每个目标存储节点在接收到该查询代码后,通过执行该查询代码在该目标存储节点中的目标页面中进行数据查询。由于无需该计算节点从目标存储节点中读取页面就能进行数据查询,因此有助于降低数据查询的资源开销,提高数据查询效率,从而改善数据库系统的性能。并且本申请提供的方案无需目标存储节点生成查询代码,对查询条件的解释次数较少,数据查询的执行速度较快。
附图说明
图1是本申请实施例提供的数据查询方法所涉及数据库系统的一种应用环境的示意图;
图2是本申请实施例提供的一种数据查询方法的流程图;
图3是本申请实施例提供的另一种数据查询方法的流程图;
图4是本申请实施例提供的一种确定目标存储节点的流程图;
图5是本申请后实施例提供的一种数据记录的示意图;
图6是本申请实施例提供的一种在目标页面中的进行数据查询的流程图;
图7是本申请实施例提供的一种数据查询装置的逻辑结构示意图;
图8是本申请实施例提供的另一种数据查询装置的逻辑结构示意图;
图9是本申请实施例提供的一种数据查询装置的硬件结构示意图。
具体实施方式
为使本申请的原理、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。
为了便于读者理解,在对本申请实施例进行详细介绍之前,以下对本申请实施例中所涉及的名词进行解释。
关系型数据库(relational database):是指采用关系模型来组织数据的数据库,其以行和列的形式存储数据。每个关系模型可以称为一个关系表。根据存储原理的不同,关系型数据库可以分为分布式关系型数据库和非分布式关系型数据库。
表空间(tablespace):是关系型数据库的逻辑划分,一个表空间只能属于一个数据库。所有的数据库对象(包括表、索引、视图、图表、缺省值、规则、触发器、用户和函数等)都存放在指定的表空间中,但是表空间中主要存放的是表,所以称为表空间,每个表空间具有唯一的身份标识码(identity document,ID),该身份标识码简称为标识。
落盘:指的是数据写入存储介质。该存储介质为非易失性计算机可读存储介质,如磁盘、只读存储器或光盘等。
事务:是维护数据库数据一致性和完整性的单位,其具备“要么全成功,要么全失败”的特性。一个事务在提交前,数据库不对其数据的一致性和完整性负责。但事务一旦提交,数据库就要保证数据的一致性和完整性,简单来说就是事务一旦提交后,就不能丢数据。在关系型数据库中,为了提升性能,一般把事务数据(即事务执行时所涉及的数据)写入到事务日志和缓冲池(buffer pool),且将事务日志落盘之后事务就提交了。
页面(page):也称页、数据页、物理页或物理页面,页面是数据库系统存储数据的基本单位。例如,在某一数据库系统中,页面的大小是8千字节(KB),则该数据库系统中每兆 字节有128页。
事务日志:在关系型数据库中,用于记录事务在执行过程中所涉及的数据的修改。该事务日志是可以直接存放在磁盘上的一组文件,其通常是顺序存储的物理日志。事务日志用于记录页面的历史修改信息(通常是物理修改信息)。比如,某一事务日志用于记录对1个页面上的第9字节(byte)至第13字节的历史修改信息。
在通过执行事务处理了数据查询请求后,相应的事务数据在事务日志和缓冲池中均已经发生变化,但还未将对应的页面记录到存储介质(如磁盘)中,这种与缓冲池中记录内容不同的页面称为脏页。基于缓冲池的数据,将脏页记录到存储介质的过程称为刷脏。若数据库还有部分脏页没有写入存储介质时,发生了故障,如崩溃(crash),缓冲池中的数据就会丢失,如此就需要存储在存储介质中的事务日志来还原缓冲池中的数据。因此,事务日志的主要作用是保证关系型数据库中的数据的一致性和完整性。
日志序列号(log sequence number,LSN):是一个递增型的整形数字,表示事务写入到事务日志的字节总量。由于其一直递增,LSN可以作为不同时刻写入的事务数据的唯一标识。LSN主要用于数据库发生故障时对数据进行恢复。
日志优先(write ahead log,WAL)原则:也称日志先行原则,即修改页面数据之前,先按照事务的执行顺序先将数据写入事务日志,再修改页面数据,之后将事务日志落盘。
下面介绍本申请实施例提供的数据查询方法所涉及的实施环境。
本申请实施例提供的数据查询方法可以应用于数据库系统,该数据库系统可以是关系型数据库系统,且该数据库系统可以是分布式数据库系统。例如,该数据库系统可以是分布式分布式关系型数据库。
示例地,请参考图1,其示出了本申请实施例提供的数据查询方法所涉及数据库系统10的一种应用环境的示意图。该数据库系统10可以为一个计算机设备或者由多个计算机设备组成的计算机集群,该计算机设备可以是服务器。该数据库系统10包括数据库管理系统(database management system,DBMS)(图1中未示出)和至少一个数据库(database,DB)(图1中未示出)。客户端20可以通过数据库管理系统对数据库进行透明操作,数据库中的数据由数据库管理系统进行管理。可选地,该数据库可以为关系型数据库。
如图1所示,该数据库系统10包括:计算节点(也称查询引擎、结构化查询语言(structured query language,SQL)引擎或数据库引擎)101和多个存储节点102(图1中示出了四个),该多个存储节点102均与该计算节点101连接,该计算节点101用于通过执行事务来进行数据处理,该存储节点102用于存储数据。其中,存储节点102中包括至少一个页面,数据存储在页面中。示例地,页面中包括多行数据记录。
本申请实施例中,计算节点101可以是单独的一个节点,或者是多个存储节点102中的指定存储节点,或者是从多个存储节点102中选举出的节点,该计算节点101可以是一个计算机设备或者由多个计算机设备组成的计算机集群,该计算机设备可以是服务器,例如,该计算节点101是一个服务器或者由多个服务器组成的服务器集群。在本申请实施例的一种实现方式中,每个存储节点102可以是一个计算机设备或者由多个计算机设备组成的计算机集群。在本申请实施例的另一种实现方式中,每个存储节点是数据库系统的一个设定的最小处理单元;示例地,每个存储节点可以为计算机设备中的一个虚拟机或一个容器,其管理和/或存储数据的一个应用实例或一个数据库执行进程。
如图1所示,客户端20可以向计算节点101发送携带查询条件的数据查询请求,计算节点101在接收到该数据查询请求后,根据该数据查询请求携带的查询条件,通过与存储节点102交互来进行数据查询。其中,该数据查询请求可以是SQL语句。
本领域技术人员可以理解,图1所示实施环境仅用于举例,并非用于限制本申请实施例的技术方案,在具体实现过程中,可以根据需要配置客户端的数量、计算节点的数量以及存储节点的数量,并且,该数据库系统中还可能包括其他节点。示例地,数据库系统可以包括多个计算节点,每个计算节点与至少一个存储节点连接,每个计算节点与其连接的存储节点属于同一个数据库,每个计算节点用于与其连接的存储节点交互来进行数据查询,本申请实施例对此不做限定。
目前,当数据库系统接收到携带查询条件的数据查询请求时,该数据库系统中的计算节点从该数据库系统中的多个存储节点读取页面,并根据查询条件在读取的页面中进行数据查询。但是,由于计算节点需要从多个存储节点读取页面才能进行数据查询,因此数据查询资源开销较大且数据查询效率较低,容易影响数据库系统的性能。
或者,当数据库系统接收到携带查询条件的数据查询请求时,该数据库系统中的计算节点向该数据库系统中的存储节点发送携带该查询条件的页面查询请求,每个存储节点根据接收到的页面查询请求携带的查询条件生成查询代码,通过执行该查询代码在该存储节点中查询数据,并将查找到的数据发送给计算节点。但是,由于接收到页面查询请求的每个存储节点都需要根据查询条件生成查询代码(也即是接收到页面查询请求的每个存储节点都需要对查询条件进行解释,而不同存储节点对该查询条件的解释过程是相同的),这导致存储节点的资源开销较大且数据查询效率较低,并且当查询条件较为复杂时,查询条件的解释过程复杂,更容易增大存储节点的资源开销,降低数据查询效率,影响数据库系统的性能。
有鉴于此,本申请实施例提供了一种数据查询方法及装置、数据库系统,在本申请实施例提供的技术方案中,计算节点在接收到携带查询条件的数据查询请求时,根据该查询条件获取查询代码,并向至少一个目标存储节点发送该查询代码,每个目标存储节点通过执行接收到的查询代码在该目标存储节点中的目标页面中进行数据查询。由于无需计算节点从目标存储节点中读取页面就能进行数据查询,有助于降低数据查询的资源开销,提高数据查询效率,从而改善数据库系统的性能。并且由于查询代码是计算节点发送给目标存储节点的,而不是目标存储节点通过条件解释得到的,因此目标存储节点无需生成查询代码就能进行数据查询,有助于减小目标存储节点的资源开销,提高数据查询效率。下面对本申请的技术方案进行详细说明。
请参考图2,其示出了本申请实施例提供的一种数据查询方法的流程图,该数据查询方法可以应用于如图1所示的实施环境。如图2所示,该方法可以包括如下几个步骤:
步骤201、客户端向计算节点发送携带查询条件的数据查询请求。
其中,客户端可以运行在计算机设备上,用户在需要查询数据时,可以通过客户端提供的界面输入查询条件,客户端可以根据用户输入的查询条件生成携带该查询条件的数据查询请求,并向数据库系统中的计算节点发送该数据查询请求。示例地,该数据查询请求可以是SQL语句,该SQL语句示例地可以是“Select form tb1 where A1=1”,其含义为从表tb1中查询字段数据1的数据记录,其中A1表示表tb1中的一个字段。例如,该表tb1可以是某公司 的员工信息表,该表tb1中包括姓名字段、年龄字段、性别字段等,则该字段A1可以是该表tb1中的姓名字段,该表tb1中的年龄字段可以为A2,性别字段可以为A3。
在本申请实施例中,数据库系统中的该计算节点可以是一个计算机设备或者是计算机设备中的节点(例如虚拟机或一个容器),如果该计算节点是计算机设备,该客户端可以运行在该计算节点上,如果该计算节点是计算机设备中的节点,该客户端可以运行在该计算节点所在的计算机设备上,或者,该客户端可以运行在与该计算节点不同的计算机设备上,本申请实施例对此不做限定。
步骤202、计算节点根据该数据查询请求携带的查询条件获取查询代码。
对应于客户端向计算节点发送数据查询请求,该计算节点可以接收该数据查询请求,对该数据查询请求进行解析得到查询条件,根据该查询条件获取查询代码。示例地,该数据查询请求可以是SQL语句,该计算节点可以具有SQL解析器,该计算节点通过该SQL解析器对该数据查询请求进行解析得到查询条件。示例地,该SQL语句是“Select form tb1 where A1=1”,该计算节点通过该SQL解析器对该数据查询请求进行解析得到的查询条件为A1=1。
可选地,该计算节点支持代码生成(codegen)技术,使得该计算节点可以具有代码生成功能,该计算节点可以根据该查询条件,基于代码生成技术生成该查询代码。也即是,该计算节点基于代码生成技术,将该查询条件解释为查询代码。
可选地,该计算节点中包括代码生成器(或者称为代码生成模块),该代码生成器用于根据该查询条件基于代码生成技术生成该查询代码并输出。该计算节点可以将该查询条件输入该代码生成器,使该代码生成器根据该查询条件生成查询代码并输出,该计算节点可以获取该代码生成器输出的查询代码。也即是,该计算节点通过该代码生成器将该查询条件解释为查询代码。
在本申请实施例中,该查询代码可以是bytecode(字节码)代码。字节码是包含可执行程序的二进制文件,该可执行程序由一系列操作码/数据对组成。字节码是一种中间代码,它比机器代码更抽象,需要翻译器转换成机器代码的中间代码。无论硬件环境如何,字节码主要用于实现特定的软件操作和软件环境,字节码的实现是通过编译器和虚拟机实现的,字节码通常不像源代码那样可读,而是一系列编码数字常量,引用,指令等。
步骤203、计算节点向至少一个目标存储节点发送查询代码。
计算节点获取到查询代码后,可以向数据库系统中的至少一个目标存储节点发送该查询代码。该至少一个目标存储节点可以是该数据库系统中与该计算节点连接的所有存储节点,或者是该数据库系统中与该计算节点连接的部分存储节点,本申请实施例对此不做限定。
步骤204、目标存储节点通过执行查询代码在该目标存储节点中的目标页面中进行数据查询。
对应于计算节点向目标存储节点发送查询代码,目标存储节点可以接收该计算节点发送的查询代码,并通过执行该查询代码在该目标存储节点中的目标页面中进行数据查询。其中,该目标页面可以是该目标存储节点中的所有页面,或者该目标页面是该目标存储节点中的部分页面,本申请实施例对此不做限定。
可选地,该目标页面中包括至少一行数据记录,该目标存储节点可以针对该目标页面中的每行数据记录执行该查询代码,以确定该数据记录是否满足查询条件,直至遍历完该目标页面中的所有数据记录,以及遍历完该目标存储节点中的所有页面,该目标存储节点将所有 满足查询条件的数据记录确定为查询出的数据记录。
步骤205、目标存储节点向计算节点发送页面查询响应,该页面查询响应包括该目标存储节点从该目标页面中查询出的数据记录。
目标存储节点从该目标存储节点的目标页面中查询出数据记录后,根据查询出的数据记录生成页面查询响应,并向计算节点发送该页面查询响应。其中,该页面查询响应可以包括该目标存储节点从该目标页面中查询出的数据记录,例如,该页面查询响应包括目标存储节点查询出的所有数据记录。
步骤206、计算节点根据该至少一个目标存储节点发送的页面查询响应,向客户端发送数据查询响应,该数据查询响应包括该至少一个目标存储节点查询出的数据记录。
对应于目标存储节点向计算节点发送页面查询响应,该计算节点可以接收该目标存储节点发送的页面查询响应,并对该页面查询响应进行解析得到该目标存储节点查询出的数据记录。计算节点接收到至少一个目标存储节点(也即是步骤203中所述的至少一个目标存储节点)发送的页面查询响应后,对该至少一个目标存储节点发送的页面查询响应进行解析得到该至少一个目标存储节点查询出的数据记录,根据该至少一个目标存储节点查询出的数据记录生成数据查询响应,并向客户端发送该数据查询响应,该数据查询响应包括该至少一个目标存储节点查询出的数据记录。
步骤207、客户端根据计算节点发送的数据查询响应,确定查询出的数据记录。
对应于计算节点向客户端发送数据查询响应,该客户端可以接收该计算节点发送的该数据查询响应,该客户端对该数据查询响应进行解析得到查询出的数据记录。可选地,该客户端得到查询出的数据记录后,可以显示该查询出的数据记录,或者应用该查询出的数据记录(例如使用该查询出的数据记录进行数据处理等等),本申请实施例在此不再赘述。
综上所述,本申请实施例提供的数据查询方法,由于无需计算节点从目标存储节点中读取页面就能进行数据查询,有助于降低数据查询的资源开销,提高数据查询效率,从而改善数据库系统的性能。并且由于查询代码是计算节点发送给目标存储节点的,而不是目标存储节点通过条件解释得到的,因此目标存储节点无需生成查询代码就能进行数据查询,有助于减小目标存储节点的资源开销,提高数据查询效率。本申请实施例提供的数据查询方法,仅需计算节点对查询条件进行解释就可以得到查询代码,各个目标存储节点仅需要根据计算节点发送的查询代码进行数据查询即可,对查询条件的解释次数较少,数据查询的执行速度较快。
如前所述,上述至少一个目标存储节点可以是与计算节点连接的所有存储节点,或者是与该计算节点连接的部分存储节点。在本申请实施例中,如果该至少一个目标存储节点是与该计算节点连接的部分存储节点,该至少一个目标存储节点可以是该计算节点根据接收到的数据查询请求携带的查询条件从与该计算节点连接的所有存储节点中确定的,则作为一种可选的实现方式,在上述步骤203之前,该方法还包括:计算节点根据查询条件在与该计算节点连接的存储节点中确定至少一个目标存储节点。
可选地,存储节点中包括至少一个页面,每个页面中包括至少一行数据记录,从而目标存储节点中的目标页面中包括至少一行数据记录。作为本申请实施例的一种可选实现方式,计算节点还可以向该至少一个目标存储节点发送页面查询请求,该页面查询请求携带页面信 息和该计算节点中的当前活跃事务的事务信息中的至少一种,该页面信息指示目标存储节点中的目标页面,该当前活跃事务为该计算节点发送该页面查询请求时该计算节点上正在执行的事务。相应地,目标存储节点可以根据页面查询请求携带的页面信息在该目标存储节点中确定目标页面,以及,根据该页面查询请求携带的当前活跃事务的事务信息,通过执行该查询代码在该目标存储节点的目标页面中按行进行数据查询。
下面结合上述可选实现方式对本申请实施例提供的数据查询方法进行介绍。
请参考图3,其示出了本申请实施例提供的另一种数据查询方法的流程图,该数据查询方法可以应用于如图1所示的实施环境。如图3所示,该方法可以包括如下几个步骤:
步骤301、客户端向计算节点发送携带查询条件的数据查询请求。
步骤302、计算节点根据该数据查询请求携带的查询条件获取查询代码。
该步骤301至步骤302的实现过程可以参考前述步骤201至步骤202,在此不再赘述。
步骤303、计算节点根据查询条件在与该计算节点连接的存储节点中确定至少一个目标存储节点。
计算节点接收到数据查询请求后,对该数据查询请求进行解析得到查询条件,根据该查询条件,在与该计算节点连接的存储节点中确定至少一个目标存储节点。在本申请实施例中,该查询条件可以包括至少一个待查询字段数据,该计算节点可以根据该查询条件中的待查询字段数据,在与该计算节点连接的存储节点中确定至少一个目标存储节点。
示例地,请参考图4,其示出了本申请实施例提供的一种计算节点确定目标存储节点的流程图,参见图4,该方法包括如下几个子步骤:
子步骤3031、根据字段数据与页面的第一映射关系,确定该至少一个待查询字段数据所在的至少一个目标页面,该第一映射关系用于指示字段数据所在的页面。
在本申请实施例中,存储节点中的每个页面中包括至少一行数据记录,每行数据记录包括至少一个字段数据,该计算节点可以维护字段数据与页面的第一映射关系,该第一映射关系用于指示字段数据所在的页面,该第一映射关系可以是根据字段数据以及字段数据所在的页面建立的,示例地,该第一映射关系可以是索引关系。请参考图5,其示出了本申请实施例提供的一种数据记录的示意图,该数据记录可以是一行数据记录,该数据记录包括字段数据1、字段数据2和字段数据3。示例地,该数据记录可以是步骤201所述的表tb1中的一行数据记录,该字段数据1可以是表tb1中的姓名字段A1中的值,该字段数据2可以是表tb1中的年龄字段A2中的值,该字段数据3可以是表tb1中的性别字段A3中的值。可选地,如图5所示,该数据记录还包括事务信息,该事务信息可以是事务ID,该事务信息指示对该数据记录进行操作(例如修改、映射等)的事务。
计算节点可以根据自身维护的字段数据与页面的该第一映射关系,确定该查询条件中的至少一个待查询字段数据中的每个待查询字段数据所在的目标页面,从而确定出至少一个目标页面。可选地,对于该至少一个待查询字段数据中的每个待查询字段数据,计算节点根据该待查询字段数据查询该第一映射关系,得到与该待查询字段数据对应的页面,将该第一映射关系中与该待查询字段数据对应的页面确定为该待查询字段数据所在的目标页面,从而确定该至少一个待查询字段数据所在的至少一个目标页面。或者,可选地,该计算节点同时根据该至少一个待查询字段数据查询该第一映射关系,将该第一映射关系中与该至少一个待查询字段数据同时对应的页面确定为该至少一个待查询字段数据所在的至少一个目标页面,本 申请实施例对此不做限定。
可选地,该第一映射关系中记录的可以是字段数据与页面标识(例如页面ID)的映射关系,每个页面标识指示一个页面,计算节点根据待查询字段数据查询该第一映射关系得到的是与该待查询字段数据对应的页面标识,该计算节点将与该待查询字段数据对应的页面标识指示的页面确定为目标页面。可以理解的是,在本申请实施例中,每个字段数据可以位于一个页面中,同一个字段数据可以位于不同的页面中,因此计算节点根据该第一映射关系确定的每个待查询字段数据所在的目标页面可以是一个或者多个,本申请实施例对此不做限定。
子步骤3032、根据页面与存储节点的第二映射关系,确定每个目标页面所在的存储节点,该第二映射关系指示页面所在的存储节点。
在本申请实施例中,计算节点可以维护页面与存储节点的第二映射关系,该第二映射关系用于指示页面所在的存储节点,该第二映射关系可以是根据页面以及页面所在的存储节点建立的,示例地,该第二映射关系可以是索引关系。计算节点可以根据该第二映射关系,确定子步骤3031中所述的至少一个目标页面中的每个目标页面所在的存储节点。可选地,对于该至少一个目标页面中的每个目标页面,计算节点根据该目标页面查询该第二映射关系得到与该目标页面对应的存储节点,将该第二映射关系中与该目标页面对应的存储节点确定为该目标页面所在的存储节点。
可选地,该第二映射关系中记录的可以是页面标识(例如页面ID)与存储节点标识(例如存储节点ID)的映射关系,每个存储节点标识指示一个存储节点。计算节点可以根据目标页面的标识查询该第二映射关系得到与该目标页面的标识对应的存储节点标识,将与该目标页面的标识对应的存储节点标识指示的存储节点确定为该目标页面所在的存储节点。可以理解的是,在本申请实施例中,每个页面可以位于一个存储节点中,同一个存储节点中可以存在多个页面,因此计算节点根据该第二映射关系确定的每个目标页面所在的存储节点可以是一个,且不同目标页面所在的存储节点可以相同,本申请实施例对此不做限定。
子步骤3033、将该至少一个目标页面所在的存储节点确定为至少一个目标存储节点。
计算节点确定出步骤3031中所述的至少一个目标页面所在的存储节点后,将该至少一个目标页面所在的存储节点确定为该至少一个目标存储节点。可以理解的是,该至少一个目标存储节点的数量小于或等于该少一个目标页面的数量,如果该至少一个目标存储节点的数量等于该至少一个目标页面的数量,说明每个目标页面位于一个存储节点中,如果该至少一个目标存储节点的数量小于该至少一个目标页面的数量,说明至少存在两个目标页面位于一个存储节点中。
步骤304、计算节点向该至少一个目标存储节点发送查询代码。
该步骤304的实现过程可以参考前述步骤203,在此不再赘述。
步骤305、计算节点向该至少一个目标存储节点发送页面查询请求,该页面查询请求携带页面信息和该计算节点中的当前活跃事务的事务信息中的至少一种。
计算节点确定至少一个目标存储节点后,可以生成页面查询请求,并向该至少一个目标存储节点发送页面查询请求,该页面查询请求可以携带页面信息和该计算节点中的当前活跃事务的事务信息中的至少一种,该页面信息指示该目标存储节点中的目标页面,该当前活跃事务为该计算节点发送该页面查询请求时该计算节点上正在执行的事务,也即是当前处于活跃状态的事务。其中,该页面信息可以是页面标识,该事务信息可以是事务标识。
可选地,该页面查询请求携带页面信息和该计算节点中的当前活跃事务的事务信息。计算节点可以根据该计算节点中的当前活跃事务以及每个目标存储节点上的目标页面,针对该目标存储节点生成页面查询请求,并向该目标存储节点发送该页面查询请求。计算节点针对每个目标存储节点生成的页面查询请求携带该计算节点中的当前活跃事务的事务信息以及该目标存储节点上的目标页面的页面信息,容易理解,计算节点针对每个目标存储节点生成的页面查询请求携带的页面信息可以不同。
可选地,计算节点每创建一个事务,可以为该事务分配一个事务标识,该事务标识可以采用数值来表征,且计算节点通常按照数值从小到大的顺序为事务分配事务标识。计算节点中当前可以存在处于活跃状态的多个事务,该页面查询请求中携带的可以是第一事务标识和第二事务标识,该第一事务标识的数值可以为该多个事务的事务标识的数值中的最大值,该第二事务标识的数值可以为该多个事务的事务标识的数值中的最小值。
示例地,假设该至少一个目标存储节点为存储节点S1和存储节点S2(例如该存储节点S1和存储节点S2可以是图1中的任意两个存储节点),该存储节点S1上的目标页面为页面11和页面12,该存储节点S2上的目标页面为页面21,页面11的标识为ID-p11,页面12的标识为ID-p12,页面21的标识为ID-p21,第一事务标识为ID-Wmax,第二事务标识为ID-Wmin,则计算节点针对存储节点S1生成的页面查询请求携带ID-Wmax、ID-Wmin、ID-p11和ID-p12,计算节点针对存储节点S2生成的页面查询请求携带ID-Wmax、ID-Wmin和ID-p21。
需要说明的是,本申请实施例并不限定该步骤305与前述步骤304的执行顺序。该步骤305与前述步骤304可以同时执行,例如,计算节点可以将查询代码携带在页面查询请求中向目标存储节点发送;或者,计算节点可以分批次向同一个目标存储节点发送页面查询请求,计算节点将查询代码携带在向每个目标存储节点发送的首个页面查询请求向目标存储节点发送。或者,可以先执行步骤304,后执行步骤305,也即是计算节点首先向目标存储节点发送查询代码,而后向目标存储节点发送页面查询请求。或者,可以先执行步骤305,后执行步骤304,也即是计算节点首先向目标存储节点发送页面查询请求,而后向目标存储节点发送查询代码,本申请实施例对此不做限定。
步骤306、目标存储节点根据页面查询请求携带的页面信息在该目标存储节点中确定目标页面。
对应于计算节点向目标存储节点发送页面查询请求,该目标存储节点可以接收该计算节点发送的页面查询请求,之后,该目标存储节点对该页面查询请求进行解析得到该页面查询请求携带的页面信息,以及该页面查询请求携带的当前活跃事务的事务信息。该目标存储节点可以根据该页面查询请求携带的页面信息,在该目标存储节点中确定目标页面。可选地,该目标存储节点在该目标存储节点的页面中确定该页面查询请求携带的页面信息指示的页面,将该页面查询请求携带的页面信息指示的页面确定为目标页面。
继续以步骤305中的例子为例。示例地,目标存储节点可以为存储节点S1,计算节点向存储节点S1发送页面查询请求携带ID-Wmax、ID-Wmin、ID-p11和ID-p12,存储节点S1对该页面查询请求进行解析得到页面标识ID-p11和ID-p12,以及当前活跃事务的事务信息ID-Wmax和ID-Wmin,该存储节点S1将该存储节点S1中,ID-p11指示的页面11以及ID-p12指示的页面12均确定为目标页面。再示例地,目标存储节点为存储节点S2,计算节点向存储节点S2发送页面查询请求携带ID-Wmax、ID-Wmin和ID-p21,存储节点S2对该页面查 询请求进行解析得到页面标识ID-p21,以及当前活跃事务的事务信息ID-Wmax和ID-Wmin,该存储节点S2将该存储节点S2中,ID-p21指示的页面21确定为目标页面。
需要说明的是,在本申请实施例中,目标存储节点确定目标页面之后,可以读取该目标页面。如前所述,页面是数据库系统存储数据的基本单位,因此目标存储节点读取目标页面可以理解为该目标存储节点按照页面单位读取该目标页面中的数据记录。
步骤307、目标存储节点根据页面查询请求携带的当前活跃事务的事务信息,通过执行该查询代码在该目标存储节点的目标页面中按行进行数据查询。
对应于计算节点向目标存储节点发送查询代码,目标存储节点可以接收该查询代码,而后,该目标存储节点根据该页面查询请求携带的当前活跃事务的事务信息,通过执行该查询代码在该目标存储节点的目标页面中按行进行数据查询。可选地,该目标页面包括至少一行数据记录,该目标存储节点可以对该目标页面进行解析以获取该目标页面中的每行数据记录,对于该目标页面中的每行数据记录,该目标存储节点通过执行处理步骤来进行数据查询。
在本申请实施例中,该目标页面中的每行数据记录包括事务信息和至少一个字段数据,每行数据记录中的事务信息指示对该数据记录进行操作的事务,因此本申请实施例所述的处理步骤可以如图6所示。示例地,请参考图6,其示出了本申请实施例提供的一种在目标页面中的进行数据查询的流程图,参见图6,该方法可以包括如下几个子步骤:
子步骤3071、根据数据记录中的事务信息和当前活跃事务的事务信息,判断该数据记录对计算节点上的目标事务是否可见。如果是,执行子步骤3072至子步骤3074;如果否,执行步骤3075。
其中,该数据记录中的事务信息可以是事务标识,例如可以是事务标识的数值,该目标事务可以是该计算节点上处理步骤301所述的数据查询请求的事务。
如前所述,页面查询请求携带的当前活跃事务的事务信息可以包括第一事务标识和第二事务标识,该第一事务标识的数值可以为该计算节点中当前处于活跃状态的多个事务的事务标识的数值中的最大值,该第二事务标识的数值可以为该多个事务的事务标识的数值中的最小值,目标存储节点可以根据每行数据记录中的事务信息,该第一事务标识和该第二事务标识,判断该数据记录对计算节点上的目标事务是否可见。
示例地,该数据记录中的事务信息可以是ID-WX,第一事务标识为ID-Wmax,第二事务标识为ID-Wmin。该目标存储节点可以判断该ID-WX的数值是否大于ID-Wmax的数值,以及判断该ID-WX的数值是否小于ID-Wmin的数值;如果该ID-WX的数值大于ID-Wmax的数值,则该数据记录对该目标事务不可见;如果该ID-WX的数值小于ID-Wmin的数值,则该数据记录对该目标事务可见;如果该ID-WX的数值处于ID-Wmin的数值与ID-Wmax的数值之间,该目标存储节点可以判断该ID-WX的数值是否等于该ID-Wmin的数值与ID-Wmax的数值之间的指定数值,如果该ID-WX的数值等于该ID-Wmin的数值与ID-Wmax的数值之间的指定数值,则该数据记录对该目标事务不可见,如果该ID-WX的数值不等于该ID-Wmin的数值与ID-Wmax的数值之间的指定数值,则该数据记录对该目标事务可见。
子步骤3072、针对该数据记录执行查询代码,以确定该数据记录是否满足查询条件。如果该数据记录满足查询条件,执行子步骤3074;如果该数据记录不满足查询条件,执行子步骤3074。
如果在子步骤3071中目标存储节点确定该数据记录对该目标事务可见,则该目标存储节 点针对该数据记录执行查询代码,以确定该数据记录是否满足查询条件。
可选地,该目标存储节点将该数据记录作为该查询代码的输入参数输入该查询代码,并执行该查询代码,根据该查询代码输出的指示信息,确定该数据记录是否满足查询条件。示例地,该查询代码输出的指示信息可以为“是”或“否”,如果该查询代码输出的指示信息为“是”,该目标存储节点确定该数据记录满足查询条件,如果该查询代码输出的指示信息为“否”,该目标存储节点确定该数据记录不满足查询条件。
需要说明的是,本申请实施例关于指示信息的说明仅仅是示例性的,实际应用中,该查询代码输出的指示信息还可以是其他的指示信息。例如,该查询代码输出的指示信息还可以是“Y”或“N”,“Y”表示输入的数据记录满足查询条件,“N”表示输入的数据记录不满足查询条件,本申请实施例对此不做限定。
子步骤3073、将该数据记录确定为查询出的数据记录。
如果在子步骤3072中目标存储节点确定该数据记录满足查询条件,则该目标存储节点将该数据记录确定为查询出的数据记录。
子步骤3074、不将该数据记录确定为查询出的数据记录。
如果在子步骤3072中目标存储节点确定该数据记录不满足查询条件,则该目标存储节点不将该数据记录确定为查询出的数据记录。
子步骤3075、跳过该数据记录。
如果在子步骤3071中目标存储节点确定该数据记录对该目标事务不可见,则该目标存储节点跳过该数据记录,也即是,该目标存储节点不针对该数据记录执行查询代码。
步骤308、目标存储节点向计算节点发送页面查询响应,该页面查询响应包括该目标存储节点的从目标页面查询出的数据记录。
该步骤308的实现过程可以参考前述步骤205,在此不再赘述。
需要说明的是,在该步骤308中,该目标存储节点向计算节点发送的页面查询响应还可以包括对目标事务不可见的数据记录,本申请实施例对此不做限定。
步骤309、计算节点根据该至少一个目标存储节点发送的页面查询响应,向客户端发送数据查询响应,该数据查询响应包括该至少一个目标存储节点查询出的数据记录。
该步骤309的实现过程可以参考前述步骤206,在此不再赘述。
需要说明的是,在该步骤309中,该目标存储节点可以对该至少一个目标存储节点发送的页面查询响应中携带的对目标事务不可见的数据记录进行处理,该计算节点向客户端发送的数据查询响应包括该至少一个目标存储节点查询出的数据记录,此外,该数据查询响应还可以包括该计算节点对该目标事务不可见的数据记录进行处理得到的数据记录,本申请实施例对此不做限定。
步骤310、客户端根据计算节点发送的数据查询响应,确定查询出的数据记录。
该步骤310的实现过程可以参考前述步骤207,在此不再赘述。
需要说明的是,在该步骤310中,该客户端确定出的数据记录可以包括至少一个目标存储节点查询出的数据记录,以及计算节点对该目标事务不可见的数据记录进行处理得到的数据记录,本申请实施例对此不做限定。
综上所述,本申请实施例提供的数据查询方法,由于无需计算节点从目标存储节点中读取页面就能进行数据查询,有助于降低数据查询的资源开销,提高数据查询效率,从而改 善数据库系统的性能。并且由于查询代码是计算节点发送给目标存储节点的,而不是目标存储节点通过条件解释得到的,因此目标存储节点无需生成查询代码就能进行数据查询,有助于减小目标存储节点的资源开销,提高数据查询效率。本申请实施例提供的数据查询方法,仅需计算节点对查询条件进行解释就可以得到查询代码,各个目标存储节点仅需要根据计算节点发送的查询代码进行数据查询即可,对查询条件的解释次数较少,数据查询的执行速度较快。
下述为本申请的装置实施例,可以用于执行本申请的方法实施例。对于本申请装置实施例中未披露的细节,请参照本申请方法实施例。
请参考图7,其示出了本申请实施例提供的一种数据查询装置700的逻辑结构示意图,该数据查询装置700可以应用于数据库系统中的计算节点,例如图1中的计算节点101。参见图7,该数据查询装置700可以包括但不限于:
获取模块710,用于在接收到携带查询条件的数据查询请求时,根据该查询条件获取查询代码。其中,该获取模块710可以用于执行前述步骤202和步骤302。
第一发送模块720,用于向该数据库系统中的至少一个目标存储节点发送该查询代码,每个目标存储节点用于通过执行该查询代码在该目标存储节点中的目标页面中进行数据查询,该至少一个目标存储节点是该数据库系统中与该计算节点连接的存储节点中的至少一个。其中,该第一发送模块720可以用于执行前述步骤202和步骤304。
可选地,该获取模块710,用于根据该查询条件,基于代码生成技术生成该查询代码。
可选地,该获取模块710,用于:
将该查询条件输入代码生成器,该代码生成器用于根据该查询条件基于代码生成技术生成该查询代码并输出;
获取该代码生成器输出的该查询代码。
可选地,请继续参考图7,该数据查询装置700还包括:
第二发送模块730,用于向该至少一个目标存储节点发送页面查询请求,该页面查询请求携带页面信息和该计算节点中的当前活跃事务的事务信息中的至少一种,该页面信息指示该目标页面,该当前活跃事务为发送该页面查询请求时该计算节点上正在执行的事务。其中,该第二发送模块730可以用于执行前述步骤305。
可选地,该查询条件包括至少一个待查询字段数据,请继续参考图7,该数据查询装置700还包括:
第一确定模块740,用于在该第一发送模块720向该数据库系统中的至少一个目标存储节点发送该查询代码之前,根据字段数据与页面的第一映射关系,确定该至少一个待查询字段数据所在的至少一个目标页面,该第一映射关系用于指示字段数据所在的页面。其中,该第一确定模块740可以用于执行前述子步骤3031。
第二确定模块750,用于根据页面与存储节点的第二映射关系,确定每个目标页面所在的存储节点,该第二映射关系指示页面所在的存储节点。其中,该第二确定模块750可以用于执行前述子步骤3032。
第三确定模块760,用于将该至少一个目标页面所在的存储节点确定为该至少一个目标存储节点。其中,该第三确定模块760可以用于执行前述子步骤3033。
综上所述,本申请实施例提供的数据查询装置,由于无需计算节点从目标存储节点中读取页面就能进行数据查询,有助于降低数据查询的资源开销,提高数据查询效率,从而改善数据库系统的性能。并且由于查询代码是计算节点发送给目标存储节点的,而不是目标存储节点通过条件解释得到的,因此目标存储节点无需生成查询代码就能进行数据查询,有助于减小目标存储节点的资源开销,提高数据查询效率。本申请实施例提供的数据查询装置,仅需计算节点对查询条件进行解释就可以得到查询代码,各个目标存储节点仅需要根据计算节点发送的查询代码进行数据查询即可,对查询条件的解释次数较少,数据查询的执行速度较快。
请参考图8,其示出了本申请实施例提供的另一种数据查询装置800的逻辑结构示意图。该数据查询装置800可以应用于数据库系统中的目标存储节点,例如图1中的存储节点102。参见图8,该数据查询装置800可以包括但不限于:
第一接收模块810,用于接收该数据库系统中的计算节点发送的查询代码,该查询代码是该计算节点根据接收到的数据查询请求携带的查询条件获取的;
查询模块820,用于通过执行该查询代码在该目标存储节点的目标页面中进行数据查询。
可选地,请继续参考图8,该数据查询装置800还包括:
第二接收模块830,用于接收该计算节点发送的页面查询请求,该页面查询请求携带页面信息和该计算节点中的当前活跃事务的事务信息中的至少一种,该页面信息指示该目标页面,该当前活跃事务为发送该页面查询请求时该计算节点上正在执行的事务。
可选地,该页面查询请求携带页面信息和该计算节点中的当前活跃事务的事务信息;
该查询模块820,用于:
根据该页面查询请求携带的页面信息在该目标存储节点中确定该目标页面;
根据该页面查询请求携带的该当前活跃事务的事务信息,通过执行该查询代码在该目标页面中按行进行数据查询。
可选地,该目标页面包括至少一行数据记录,每行数据记录包括事务信息和至少一个字段数据,每行数据记录中的事务信息指示对该数据记录进行操作的事务;
该查询模块820,用于对于该目标页面中的每行数据记录,通过执行下述处理步骤进行数据查询;其中,该处理步骤包括:
根据该数据记录中的事务信息和该当前活跃事务的事务信息,判断该数据记录对该计算节点上的目标事务是否可见,该目标事务是该计算节点上处理该数据查询请求的事务;
如果该数据记录对该目标事务可见,针对该数据记录执行该查询代码,以确定该数据记录是否满足该查询条件;
如果该数据记录满足该查询条件,将该数据记录确定为查询出的数据记录。
可选地,请继续参考图8,该数据查询装置800还包括:
发送模块840,用于向该计算节点发送页面查询响应,该页面查询响应包括从该目标存储节点的至少一个目标页面查询出的数据记录。
综上所述,本申请实施例提供的数据查询装置,由于无需计算节点从目标存储节点中读取页面就能进行数据查询,有助于降低数据查询的资源开销,提高数据查询效率,从而改善数据库系统的性能。并且由于查询代码是计算节点发送给目标存储节点的,而不是目标存储 节点通过条件解释得到的,因此目标存储节点无需生成查询代码就能进行数据查询,有助于减小目标存储节点的资源开销,提高数据查询效率。本申请实施例提供的数据查询装置,仅需计算节点对查询条件进行解释就可以得到查询代码,各个目标存储节点仅需要根据计算节点发送的查询代码进行数据查询即可,对查询条件的解释次数较少,数据查询的执行速度较快。
请参考图9,其示出了本申请实施例提供的一种数据查询装置900的硬件结构示意图,该数据查询装置900可以是计算机设备,例如服务器。该数据查询装置900可以是计算节点或存储节点,或者该数据查询装置900中包括计算节点和存储节点。
参见图9,该数据查询装置900包括处理器902、存储器904、通信接口906和总线908,处理器902、存储器904和通信接口906通过总线908彼此通信连接。本领域技术人员应当明白,图9所示的处理器902、存储器904和通信接口906之间的连接方式仅仅是示例性的,在实现过程中,处理器902、存储器904和通信接口906也可以采用除了总线908之外的其他连接方式彼此通信连接。
其中,存储器904可以用于存储计算机程序9042,该计算机程序可以包括指令和数据。在本申请实施例中,存储器904可以是各种类型的存储介质,例如随机存取存储器(random access memory,RAM)、只读存储器(read-only memory,ROM)、非易失性RAM(non-volatile RAM,NVRAM)、可编程ROM(programmable ROM,PROM)、可擦除PROM(erasable PROM,EPROM)、电可擦除PROM(electrically erasable PROM,EEPROM)、闪存、光存储器和寄存器等。并且,该存储器904可以包括硬盘和/或内存。
其中,处理器902可以是通用处理器,通用处理器可以是通过读取并执行存储器(例如存储器904)中存储的计算机程序(例如计算机程序9042)来执行特定步骤和/或操作的处理器,通用处理器在执行上述步骤和/或操作的过程中可能用到存储在存储器(例如存储器904)中的数据。通用处理器可以是,例如但不限于,中央处理器(central processing unit,CPU)。此外,处理器902也可以是专用处理器,专用处理器可以是专门设计的用于执行特定步骤和/或操作的处理器,该专用处理器可以是,例如但不限于,数字信号处理器(digital signal processor,DSP)、专用集成电路(application-specific integrated circuit,ASIC)或者可编程逻辑器件(programmable logic device,PLD),该PLD可以是复杂程序逻辑器件(complex programmable logical device,CPLD),现场可编程门阵列(field-programmable gate array,FPGA),通用阵列逻辑(generic array logic,GAL)或其任意组合等。此外,处理器902还可以是多个处理器的组合,例如多核处理器。处理器902可以包括至少一个电路,以执行上述实施例提供的数据查询方法的全部或部分步骤。
其中,通信接口906可以包括输入/输出(input/output,I/O)接口、物理接口和逻辑接口等用于实现数据查询装置900内部的器件互连的接口,以及用于实现数据查询装置900与其他设备(例如客户端所在的用户设备)互连的接口。物理接口可以是千兆的以太接口(gigabit Ethernet,GE),其可以用于实现数据查询装置900与其他设备互连,逻辑接口是数据查询装置900内部的接口,其可以用于实现数据查询装置900内部的器件互连。容易理解,通信接口906可以用于数据查询装置900与其他设备通信,例如,通信接口906用于数据查询装置900与其他设备之间信息的发送和接收。
其中,总线908可以是任何类型的,用于实现处理器902、存储器904和通信接口906互连的通信总线,例如系统总线。
上述器件可以分别设置在彼此独立的芯片上,也可以至少部分的或者全部的设置在同一块芯片上。将各个器件独立设置在不同的芯片上,还是整合设置在一个或者多个芯片上,往往取决于产品设计的需要。本申请实施例对上述器件的具体实现形式不做限定。
图9所示的数据查询装置900仅仅是示例性的,在实现过程中,数据查询装置900还可以包括其他组件,本文不再一一列举。该图9所示的数据查询装置900可以通过执行上述实施例提供的数据查询方法的全部或部分步骤来进行数据查询。
本申请实施例提供了一种计算机可读存储介质,该计算机可读存储介质内存储有计算机程序,当该计算机程序被处理器执行时实现如上述方法实施例提供的数据查询方法的全部或部分步骤。
本申请实施例提供了一种包含指令的计算机程序产品,当该计算机程序产品在计算机上运行时,使得该计算机执行如上述方法实施例提供的数据查询方法的全部或部分步骤。
本申请实施例提供了一种芯片,该芯片包括可编程逻辑电路和/或程序指令,当该芯片运行时用于实现如上述方法实施例提供的数据查询方法的全部或部分步骤。
本申请实施例提供了一种数据库系统,该数据库系统包括:计算节点以及与该计算节点连接的至少一个存储节点,示例地,该数据库系统可以是如图1所示的数据库系统10。
其中,该计算节点包括如图7所示的数据查询装置700,该存储节点包括如图8所示的数据查询装置800;或者,该计算节点和该存储节点中的至少一个为上述图9所示的数据查询装置900,本申请实施例在此不再赘述。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现,所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机的可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者包含一个或多个可用介质集成的服务器、数据中心等数据存储装置。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质,或者半导体介质(例如固态硬盘)等。
在本申请中,术语“第一”和“第二”等仅用于描述目的,而不能理解为指示或暗示相对重要性。术语“至少一个”指一个或多个,“多个”指两个或两个以上,除非另有明确的限定。
本申请实施例提供的方法实施例和装置实施例等不同类型的实施例均可以相互参考,本申请实施例对此不做限定。本申请实施例提供的方法实施例操作的先后顺序能够进行适当调整,操作也能够根据情况进行响应增减,任何熟悉本技术领域的技术人员在本申请揭露的技 术范围内,可轻易想到变化的方法,都应涵盖在本申请的保护范围之内,因此不再赘述。
在本申请提供的相应实施例中,应该理解到,所揭露的装置等可以通过其它的构成方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性或其它的形式。
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元描述的部件可以是或者也可以不是物理单元,既可以位于一个地方,或者也可以分布到多个网络设备(例如终端设备)上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
以上所述,仅为本申请的示例性实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。

Claims (23)

  1. 一种数据查询方法,其特征在于,应用于数据库系统中的计算节点,所述方法包括:
    在接收到携带查询条件的数据查询请求时,根据所述查询条件获取查询代码;
    向所述数据库系统中的至少一个目标存储节点发送所述查询代码,每个所述目标存储节点用于通过执行所述查询代码在所述目标存储节点中的目标页面中进行数据查询,所述至少一个目标存储节点是所述数据库系统中与所述计算节点连接的存储节点中的至少一个。
  2. 根据权利要求1所述的方法,其特征在于,
    所述根据所述查询条件获取查询代码,包括:
    根据所述查询条件,基于代码生成技术生成所述查询代码。
  3. 根据权利要求1或2所述的方法,其特征在于,
    所述根据所述查询条件获取查询代码,包括:
    将所述查询条件输入代码生成器,所述代码生成器用于根据所述查询条件基于代码生成技术生成所述查询代码并输出;
    获取所述代码生成器输出的所述查询代码。
  4. 根据权利要求1至3任一项所述的方法,其特征在于,所述方法还包括:
    向所述至少一个目标存储节点发送页面查询请求,所述页面查询请求携带页面信息和所述计算节点中的当前活跃事务的事务信息中的至少一种,所述页面信息指示所述目标页面,所述当前活跃事务为发送所述页面查询请求时所述计算节点上正在执行的事务。
  5. 根据权利要求1至4任一项所述的方法,其特征在于,
    所述查询条件包括至少一个待查询字段数据;在向所述数据库系统中的至少一个目标存储节点发送所述查询代码之前,所述方法还包括:
    根据字段数据与页面的第一映射关系,确定所述至少一个待查询字段数据所在的至少一个目标页面,所述第一映射关系用于指示字段数据所在的页面;
    根据页面与存储节点的第二映射关系,确定每个所述目标页面所在的存储节点,所述第二映射关系指示页面所在的存储节点;
    将所述至少一个目标页面所在的存储节点确定为所述至少一个目标存储节点。
  6. 一种数据查询方法,其特征在于,应用于数据库系统中的目标存储节点,所述方法包括:
    接收所述数据库系统中的计算节点发送的查询代码,所述查询代码是所述计算节点根据接收到的数据查询请求携带的查询条件获取的;
    通过执行所述查询代码在所述目标存储节点的目标页面中进行数据查询。
  7. 根据权利要求6所述的方法,其特征在于,所述方法还包括:
    接收所述计算节点发送的页面查询请求,所述页面查询请求携带页面信息和所述计算节点中的当前活跃事务的事务信息中的至少一种,所述页面信息指示所述目标页面,所述当前活跃事务为发送所述页面查询请求时所述计算节点上正在执行的事务。
  8. 根据权利要求7所述的方法,其特征在于,
    所述页面查询请求携带页面信息和所述计算节点中的当前活跃事务的事务信息;
    所述通过执行所述查询代码在所述目标存储节点的目标页面中进行数据查询,包括:
    根据所述页面查询请求携带的页面信息在所述目标存储节点中确定所述目标页面;
    根据所述页面查询请求携带的所述当前活跃事务的事务信息,通过执行所述查询代码在所述目标页面中按行进行数据查询。
  9. 根据权利要求8所述的方法,其特征在于,
    所述目标页面包括至少一行数据记录,每行所述数据记录包括事务信息和至少一个字段数据,每行所述数据记录中的所述事务信息指示对所述数据记录进行操作的事务;
    所述根据所述页面查询请求携带的所述当前活跃事务的事务信息,通过执行所述查询代码在所述目标页面中按行进行数据查询,包括:
    对于所述目标页面中的每行数据记录,通过执行下述处理步骤进行数据查询;
    其中,所述处理步骤包括:
    根据所述数据记录中的事务信息和所述当前活跃事务的事务信息,判断所述数据记录对所述计算节点上的目标事务是否可见,所述目标事务是所述计算节点上处理所述数据查询请求的事务;
    如果所述数据记录对所述目标事务可见,针对所述数据记录执行所述查询代码,以确定所述数据记录是否满足所述查询条件;
    如果所述数据记录满足所述查询条件,将所述数据记录确定为查询出的数据记录。
  10. 根据权利要求9所述的方法,其特征在于,所述方法还包括:
    向所述计算节点发送页面查询响应,所述页面查询响应包括从所述目标存储节点的至少一个所述目标页面查询出的数据记录。
  11. 一种数据查询装置,其特征在于,应用于数据库系统中的计算节点,所述装置包括:
    获取模块,用于在接收到携带查询条件的数据查询请求时,根据所述查询条件获取查询代码;
    第一发送模块,用于向所述数据库系统中的至少一个目标存储节点发送所述查询代码,每个所述目标存储节点用于通过执行所述查询代码在所述目标存储节点中的目标页面中进行数据查询,所述至少一个目标存储节点是所述数据库系统中与所述计算节点连接的存储节点中的至少一个。
  12. 根据权利要求11所述的装置,其特征在于,
    所述获取模块,用于根据所述查询条件,基于代码生成技术生成所述查询代码。
  13. 根据权利要求11或12所述的装置,其特征在于,
    所述获取模块,用于:
    将所述查询条件输入代码生成器,所述代码生成器用于根据所述查询条件基于代码生成技术生成所述查询代码并输出;
    获取所述代码生成器输出的所述查询代码。
  14. 根据权利要求11至13任一项所述的装置,其特征在于,所述装置还包括:
    第二发送模块,用于向所述至少一个目标存储节点发送页面查询请求,所述页面查询请求携带页面信息和所述计算节点中的当前活跃事务的事务信息中的至少一种,所述页面信息指示所述目标页面,所述当前活跃事务为发送所述页面查询请求时所述计算节点上正在执行的事务。
  15. 根据权利要求11至14任一项所述的装置,其特征在于,
    所述查询条件包括至少一个待查询字段数据;所述装置还包括:
    第一确定模块,用于在所述第一发送模块向所述至少一个目标存储节点发送所述查询代码之前,根据字段数据与页面的第一映射关系,确定所述至少一个待查询字段数据所在的至少一个目标页面,所述第一映射关系用于指示字段数据所在的页面;
    第二确定模块,用于根据页面与存储节点的第二映射关系,确定每个所述目标页面所在的存储节点,所述第二映射关系指示页面所在的存储节点;
    第三确定模块,用于将所述至少一个目标页面所在的存储节点确定为所述至少一个目标存储节点。
  16. 一种数据查询装置,其特征在于,应用于数据库系统中的目标存储节点,所述装置包括:
    第一接收模块,用于接收所述数据库系统中的计算节点发送的查询代码,所述查询代码是所述计算节点根据接收到的数据查询请求携带的查询条件获取的;
    查询模块,用于通过执行所述查询代码在所述目标存储节点的目标页面中进 行数据查询。
  17. 根据权利要求16所述的装置,其特征在于,所述装置还包括:
    第二接收模块,用于接收所述计算节点发送的页面查询请求,所述页面查询请求携带页面信息和所述计算节点中的当前活跃事务的事务信息中的至少一种,所述页面信息指示所述目标页面,所述当前活跃事务为发送所述页面查询请求时所述计算节点上正在执行的事务。
  18. 根据权利要求17所述的装置,其特征在于,
    所述页面查询请求携带页面信息和所述计算节点中的当前活跃事务的事务信息;
    所述查询模块,用于:
    根据所述页面查询请求携带的页面信息在所述目标存储节点中确定所述目标页面;
    根据所述页面查询请求携带的所述当前活跃事务的事务信息,通过执行所述查询代码在所述目标页面中按行进行数据查询。
  19. 根据权利要求18所述的装置,其特征在于,
    所述目标页面包括至少一行数据记录,每行所述数据记录包括事务信息和至少一个字段数据,每行所述数据记录中的所述事务信息指示对所述数据记录进行操作的事务;
    所述查询模块,用于对于所述目标页面中的每行数据记录,通过执行下述处理步骤进行数据查询;
    其中,所述处理步骤包括:
    根据所述数据记录中的事务信息和所述当前活跃事务的事务信息,判断所述数据记录对所述计算节点上的目标事务是否可见,所述目标事务是所述计算节点上处理所述数据查询请求的事务;
    如果所述数据记录对所述目标事务可见,针对所述数据记录执行所述查询代码,以确定所述数据记录是否满足所述查询条件;
    如果所述数据记录满足所述查询条件,将所述数据记录确定为查询出的数据记录。
  20. 根据权利要求19所述的装置,其特征在于,所述装置还包括:
    发送模块,用于向所述计算节点发送页面查询响应,所述页面查询响应包括从所述目标存储节点的至少一个所述目标页面查询出的数据记录。
  21. 一种数据查询装置,其特征在于,包括存储器和处理器;
    所述存储器用于存储计算机程序;
    所述处理器用于执行所述存储器中存储的所述计算机程序以实现如权利要求1至5 任一项所述的数据查询方法,或者,实现如权利要求6至10任一项所述的数据查询方法。
  22. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至5任一项所述的数据查询方法,或者,实现如权利要求6至10任一项所述的数据查询方法。
  23. 一种数据库系统,其特征在于,所述数据库系统包括:计算节点以及与所述计算节点连接的至少一个存储节点,所述计算节点包括如权利要求11至15任一项所述的数据查询装置,所述存储节点包括如权利要求16至20任一项所述的数据查询装置;或者,所述计算节点和所述存储节点中的至少一个为权利要求21所述的数据查询装置。
PCT/CN2021/101727 2020-09-18 2021-06-23 数据查询方法及装置、数据库系统 WO2022057357A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010988526.0A CN114201505A (zh) 2020-09-18 2020-09-18 数据查询方法及装置、数据库系统
CN202010988526.0 2020-09-18

Publications (1)

Publication Number Publication Date
WO2022057357A1 true WO2022057357A1 (zh) 2022-03-24

Family

ID=80645175

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/101727 WO2022057357A1 (zh) 2020-09-18 2021-06-23 数据查询方法及装置、数据库系统

Country Status (2)

Country Link
CN (1) CN114201505A (zh)
WO (1) WO2022057357A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115510125A (zh) * 2022-09-27 2022-12-23 阿里云计算有限公司 流量数据查询方法、设备、系统及存储介质

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117312298A (zh) * 2022-06-24 2023-12-29 中兴通讯股份有限公司 数据查询方法、数据库节点及计算机可读存储介质
CN115905055A (zh) * 2022-10-21 2023-04-04 超聚变数字技术有限公司 一种计算设备及数据获取方法
CN116108238B (zh) * 2023-04-12 2023-06-16 杭州悦数科技有限公司 一种图数据库中多跳查询的优化方法、系统和装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102521307A (zh) * 2011-12-01 2012-06-27 北京人大金仓信息技术股份有限公司 一种云计算环境下的无共享数据库集群并行查询处理方法
CN103123652A (zh) * 2013-03-14 2013-05-29 曙光信息产业(北京)有限公司 数据查询方法和集群数据库系统
US20140280020A1 (en) * 2013-03-13 2014-09-18 Futurewei Technologies, Inc. System and Method for Distributed SQL Join Processing in Shared-Nothing Relational Database Clusters Using Self Directed Data Streams
CN109726213A (zh) * 2018-12-10 2019-05-07 网易无尾熊(杭州)科技有限公司 一种程序代码转换方法、装置、介质和计算设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102521307A (zh) * 2011-12-01 2012-06-27 北京人大金仓信息技术股份有限公司 一种云计算环境下的无共享数据库集群并行查询处理方法
US20140280020A1 (en) * 2013-03-13 2014-09-18 Futurewei Technologies, Inc. System and Method for Distributed SQL Join Processing in Shared-Nothing Relational Database Clusters Using Self Directed Data Streams
CN103123652A (zh) * 2013-03-14 2013-05-29 曙光信息产业(北京)有限公司 数据查询方法和集群数据库系统
CN109726213A (zh) * 2018-12-10 2019-05-07 网易无尾熊(杭州)科技有限公司 一种程序代码转换方法、装置、介质和计算设备

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115510125A (zh) * 2022-09-27 2022-12-23 阿里云计算有限公司 流量数据查询方法、设备、系统及存储介质

Also Published As

Publication number Publication date
CN114201505A (zh) 2022-03-18

Similar Documents

Publication Publication Date Title
WO2022057357A1 (zh) 数据查询方法及装置、数据库系统
US11475034B2 (en) Schemaless to relational representation conversion
CN107247808B (zh) 一种分布式NewSQL数据库系统及图片数据查询方法
TWI710919B (zh) 資料儲存裝置、轉譯裝置及資料庫存取方法
EP3602351B1 (en) Apparatus and method for distributed query processing utilizing dynamically generated in-memory term maps
US20160357740A1 (en) Metadata Updating Method and Apparatus Based on Columnar Storage in Distributed File System, and Host
KR20060082393A (ko) 저장된 프로시저의 정의로부터 관계형 데이터베이스애플리케이션의 미들 티어를 위한 데이터 액세스 계층을자동으로 생성하는 시스템 및 방법
US10515078B2 (en) Database management apparatus, database management method, and storage medium
CN108038213A (zh) 一种数据处理的方法、客户端、服务器及系统
CN113051268A (zh) 数据查询方法、数据查询装置、电子设备及存储介质
US10417058B1 (en) Method and system for executing application programming interface (API) requests based on parent-child object relationships
CN113254519B (zh) 多源异构数据库的访问方法、装置、设备和存储介质
CN112912870A (zh) 租户标识符的转换
CN113901078A (zh) 业务订单关联查询方法、装置、设备及存储介质
US20210286806A1 (en) Personal information indexing for columnar data storage format
CN111708807A (zh) 数据扁平化处理方法、装置、设备及存储介质
CN114443680A (zh) 数据库管理系统、相关装置、方法和介质
US20230385308A1 (en) Conversion and migration of key-value store to relational model
CN113761016A (zh) 数据查询方法、装置、设备及存储介质
CN112889039A (zh) 用于克隆后租户标识符转换的记录的标识
EP4024226A1 (en) Query tree labeling and processing
US11580251B1 (en) Query-based database redaction
CN114238334A (zh) 异构数据编码、解码方法和装置、计算机设备和存储介质
JP2022018435A (ja) データ管理装置及びデータ管理方法
CN112347794A (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: 21868186

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21868186

Country of ref document: EP

Kind code of ref document: A1