WO2024055695A1 - 创建索引的方法及数据库系统 - Google Patents
创建索引的方法及数据库系统 Download PDFInfo
- Publication number
- WO2024055695A1 WO2024055695A1 PCT/CN2023/103975 CN2023103975W WO2024055695A1 WO 2024055695 A1 WO2024055695 A1 WO 2024055695A1 CN 2023103975 W CN2023103975 W CN 2023103975W WO 2024055695 A1 WO2024055695 A1 WO 2024055695A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- data
- target data
- storage node
- computing
- node
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2219—Large Object storage; Management thereof
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2282—Tablespace storage structures; Management thereof
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2458—Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
- G06F16/2471—Distributed queries
Definitions
- This application relates to the field of database technology, and in particular to a method for creating an index and a database system.
- Creating an index for data in a database is one of the most commonly used database definition semantics (data definition language, DDL) operations, and is an operation that often occurs during database system operation and maintenance. Querying through indexes can speed up querying and improve query performance. It is widely used in scenarios where users need to speed up querying.
- the computing node when creating an index for a data table in the database, the computing node needs to read all the data of the data table from the storage node, and then create an index based on all the data of the data table.
- This application provides a method for creating an index and a database system. This application helps improve the efficiency of index creation.
- the technical solutions provided by this application are as follows:
- this application provides a database system.
- the database system includes: computing nodes and storage nodes.
- the storage nodes store data tables, and the data tables record data with multiple rows and columns.
- the storage node is used to determine the instruction information of the target data required to create an index.
- the target data is part of the data in the target data table; the storage node is also used to obtain the target data from the target data table based on the instruction information.
- providing target data to the computing node; the computing node is used to create indexes based on the target data.
- the storage node obtains the target data required to create an index from the target data table and provides the target data to the computing node.
- the storage node transmits the entire target data table recorded to the computing node. data, reducing the amount of data transmitted from storage nodes to computing nodes, helping to improve I/O performance between storage nodes and computing nodes.
- the computing node is not required to perform the operation of obtaining the target data from the target data table, which reduces the computing load of the computing node and helps to improve the efficiency of index creation by the computing node and the computing performance of the computing node.
- the computing node is further configured to receive an index creation instruction, determine instruction information based on the index creation instruction, and provide instruction information to the storage node, where the index creation instruction instructs to create an index based on the target data.
- the computing node may determine whether to send the indication information to the storage node based on the indication information, and when it is necessary to obtain the target data through the storage node, provide the indication information to the storage node.
- the computing node is specifically configured to provide instruction information to the storage node when the first consumption and the second consumption corresponding to the target data meet specified conditions.
- the first consumption is for the storage node to obtain the target data based on the target data table
- the consumption caused by providing the target data to the computing node, the second consumption is the consumption caused by the storage node providing the target data table to the computing node, and the computing node obtaining the target data based on the target data table.
- the computing node may send the instruction information to the storage node.
- the computing node can send instruction information to the storage node in the form of an I/O request. For example, the computing node sends a data acquisition request to the storage node, and the data acquisition request requests the storage node to provide target data indicated by the indication information to the computing node.
- the target data is part of the data in the target data table indicated by the index creation instruction.
- the target data may include data recorded in a specified data unit of the target data table, and the data unit may be a data row or a data column. data column.
- the target data may be data recorded in a specified data column of the target data table.
- the target data includes: partial data recorded in the designated data unit of the target data table.
- this part of the data can be prefix data, intermediate data, and suffix data of the data recorded in the specified data unit. data or data of specified length.
- the type of data recorded in the specified data unit is a string and/or a large object field
- the target data It can be the prefix data of the data recorded in the data row corresponding to the specified data column of the target data table.
- the storage node obtains the target data from the target data table and provides the target data to the computing node, which can further reduce storage
- the amount of data transmitted by the node to the computing node reduces the computing load of the computing node, thereby further improving the efficiency of index creation and the computing performance of the computing node.
- this application provides a method of creating an index.
- This method is applied to database systems.
- the database system includes: computing nodes and storage nodes.
- the storage nodes store data tables.
- the data tables record data with multiple rows and columns.
- the method includes: the storage node determines the instruction information of the target data required to create the index, and the target data is part of the data in the target data table; the storage node obtains the target data from the target data table based on the instruction information, and provides the target data to the computing node Data; compute nodes create indexes based on target data.
- the method before the storage node determines the instruction information of the target data required to create the index, the method also includes: the computing node receives the index creation instruction, determines the instruction information based on the index creation instruction, and provides the instruction information to the storage node, and the index is created
- the directive instructs you to create an index based on the target data.
- the computing node provides instruction information to the storage node, including: the computing node provides instruction information to the storage node when the first consumption and the second consumption corresponding to the target data meet specified conditions, and the first consumption is the storage node based on the target data.
- the second consumption is the consumption caused by the storage node providing the target data table to the computing node, and the computing node obtaining the target data based on the target data table.
- the computing node provides the indication information to the storage node, including: the computing node sends a data acquisition request to the storage node, and the data acquisition request is used to request the storage node to provide the target data indicated by the indication information to the computing node.
- the target data includes: data recorded in the specified data unit of the target data table, and the data unit is a data row or a data column.
- the target data includes: partial data recorded in the specified data unit of the target data table.
- part of the data is prefix data, intermediate data, suffix data or data of a specified length of the data recorded in the specified data unit.
- this application provides a storage node.
- the storage node stores a data table, and the data table records data with multiple rows and columns.
- the storage node includes: a processing module, used to determine the instruction information of the target data required to create the index, and the target data is part of the data in the target data table; the processing module is also used to obtain the target data from the target data table based on the instruction information. ;Interaction module, used to provide target data to computing nodes.
- the interaction module is also used to receive instruction information provided by the computing node.
- the interaction module is specifically configured to receive a data acquisition request sent by the computing node.
- the data acquisition request is used to request the storage node to provide target data indicated by the indication information to the computing node.
- the target data includes: data recorded in the specified data unit of the target data table, and the data unit is a data row or a data column.
- the target data includes: partial data recorded in the specified data unit of the target data table.
- part of the data is prefix data, intermediate data, suffix data or data of a specified length of the data recorded in the specified data unit.
- this application provides a computing node.
- the computing node includes: an interaction module, used to receive the target data sent by the storage node; a processing module, used to create an index based on the target data.
- the target data is part of the data in the target data table stored in the storage node, and the target data table records data with multiple rows and columns.
- the interaction module is also used to receive an index creation instruction, which instructs to create an index based on the target data; the processing module is also used to determine indication information based on the index creation instruction; and the interaction module is also used to provide indication information to the storage node.
- the interaction module is specifically configured to provide instruction information to the storage node when the first consumption and the second consumption corresponding to the target data meet specified conditions.
- the first consumption is that the storage node obtains the target data based on the target data table and provides it to the computing node.
- the consumption caused by the node providing the target data, the second consumption is the consumption caused by the storage node providing the target data table to the computing node, and the computing node obtaining the target data based on the target data table.
- the interaction module is specifically configured to send a data acquisition request to the storage node, and the data acquisition request is used to request the storage node to provide the target data indicated by the indication information to the computing node.
- the target data includes: data recorded in the specified data unit of the target data table, and the data unit is a data row or a data column.
- the target data includes: partial data recorded in the specified data unit of the target data table.
- part of the data is prefix data, intermediate data, suffix data or data of a specified length of the data recorded in the specified data unit.
- this application provides a method of creating an index.
- This method applies to storage nodes.
- the storage node stores a data table, and the data table records data with multiple rows and columns.
- the method includes: the storage node determines the instruction information of the target data required to create the index, and the target data is part of the data in the target data table; the storage node obtains the target data from the target data table based on the instruction information, and provides the target data to the computing node data.
- the method further includes: the storage node receives the instruction information provided by the computing node.
- the storage node receives the instruction information provided by the computing node, including: the storage node receives a data acquisition request sent by the computing node, and the data acquisition request is used to request the storage node to provide the target data indicated by the instruction information to the computing node.
- the target data includes: data recorded in the specified data unit of the target data table, and the data unit is a data row or a data column.
- the target data includes: partial data recorded in the specified data unit of the target data table.
- part of the data is prefix data, intermediate data, suffix data or data of a specified length of the data recorded in the specified data unit.
- this application provides a method of creating an index.
- This method applies to compute nodes.
- the method includes: a computing node receives target data sent by a storage node, and creates an index based on the target data.
- the target data is part of the data in the target data table stored in the storage node, and the target data table records data with multiple rows and columns.
- the method before the computing node receives the target data sent by the storage node, the method also includes: the computing node receives the index creation instruction, determines the indication information based on the index creation instruction, and provides the instruction information to the storage node, and the index creation instruction indicates based on the target Data is indexed.
- the computing node provides instruction information to the storage node, including: when the first consumption and the second consumption corresponding to the target data meet specified conditions, providing instruction information to the storage node.
- the first consumption is obtained by the storage node based on the target data table.
- the second consumption is the consumption caused by the storage node providing the target data table to the computing node, and the computing node obtaining the target data based on the target data table.
- the computing node provides the instruction information to the storage node, including: sending a data acquisition request to the storage node.
- the data acquisition request is used to request the storage node to provide the target data indicated by the instruction information to the computing node.
- the target data includes: data recorded in the specified data unit of the target data table, and the data unit is a data row or a data column.
- the target data includes: partial data recorded in the specified data unit of the target data table.
- part of the data is prefix data, intermediate data, suffix data or data of a specified length of the data recorded in the specified data unit.
- this application provides a computing device, including a memory and a processor.
- the memory stores program instructions
- the processor runs the program instructions to execute the method provided in the fifth aspect of this application and any possible implementation thereof. , or execute the method provided in the sixth aspect of this application and any possible implementation manner thereof.
- the present application provides a computing device cluster, including at least one computing device, each computing device including a processor and a memory, and the processor of the at least one computing device is used to execute instructions stored in the memory of the at least one computing device, So as to cause the computing device cluster to execute the method provided in the second aspect of the present application and any possible implementation manner thereof.
- this application provides a computer program product containing instructions that, when executed by a computing device, cause the computing device to execute the method provided in the fifth aspect of this application and any possible implementation thereof, or, Execute the method provided in the sixth aspect of this application and any possible implementation manner thereof.
- this application provides a computer program product containing instructions.
- the computing device cluster executes the method provided in the second aspect of this application and any possible implementation manner thereof.
- the present application provides a computer-readable storage medium.
- the computer-readable storage medium is a non-volatile computer-readable storage medium.
- the computer-readable storage medium includes computer program instructions. When the computer program instructions are When the computing device executes, the computing device executes the method provided in the fifth aspect of the application and any possible implementation manner thereof, or executes the method provided in the sixth aspect of the application and any possible implementation manner thereof.
- the application provides a computer-readable storage medium.
- the computer-readable storage medium is a non-volatile computer-readable storage medium.
- the computer-readable storage medium includes computer program instructions. When the computer program instructions are When the computing device cluster executes, the computing device cluster executes the method provided in the second aspect of this application and any possible implementation manner thereof.
- Figure 1 is a schematic diagram of the implementation environment involved in a method for creating an index provided by an embodiment of the present application
- Figure 2 is a schematic structural diagram of a database system provided by an embodiment of the present application.
- Figure 3 is a schematic structural diagram of another database system provided by an embodiment of the present application.
- Figure 4 is a flow chart of a method for creating an index provided by an embodiment of the present application.
- Figure 5 is a schematic structural diagram of a storage node provided by an embodiment of the present application.
- Figure 6 is a schematic structural diagram of a computing node provided by an embodiment of the present application.
- Figure 7 is a flow chart of a method for creating an index on a storage node provided by an embodiment of the present application.
- Figure 8 is a flow chart of a method for creating an index on a computing node provided by an embodiment of the present application
- Figure 9 is a schematic structural diagram of a computing device provided by an embodiment of the present application.
- Figure 10 is a schematic structural diagram of a computing device cluster provided by an embodiment of the present application.
- indexing through indexes can speed up querying and improve query performance. It is widely used in scenarios when users need to speed up querying.
- the computing node when creating an index for a data table in the database, the computing node needs to read all the data of the data table from the storage node, and then create an index based on all the data of the data table.
- the embodiments of the present application provide a method for creating an index and a database system for implementing the method.
- the database system includes computing nodes and storage nodes.
- a data table is stored in the storage node, and the data table records multiple rows and columns of data.
- the storage node is used to determine the instruction information of the target data required to create the index, obtain the target data from the target data table based on the instruction information, and provide the target data to the computing node.
- Compute nodes are used to create indexes based on target data. Among them, the target data is part of the data in the target data table.
- the storage node obtains the target data required to create an index from the target data table and provides the target data to the computing node.
- the storage node transmits the entire target data table recorded to the computing node. data, reducing the amount of data transmitted from storage nodes to computing nodes, helping to improve input/output (I/O) performance between storage nodes and computing nodes.
- the computing node is not required to perform the operation of obtaining the target data from the target data table, which reduces the computing load of the computing node and helps to improve the efficiency of index creation by the computing node and the computing performance of the computing node.
- Figure 1 is a schematic diagram of an implementation environment involved in a method for creating an index provided by an embodiment of the present application.
- the implementation environment includes: client 01 and database system 02.
- a data table is recorded in the database system 02.
- Client 01 can establish a communication connection with database system 02.
- a communication connection can be established between client 01 and database system 02 through the network.
- the network can be a local area network, the Internet, or other networks, which are not limited in the embodiments of this application.
- client 01 Users can interact with database system 02 through client 01.
- the client 01 is used to send instructions to the database system 02 according to the user's instructions. For example, send an index creation command to instruct the database system to create an index.
- a data access instruction is sent to instruct data access to the database system.
- the client 01 can be a desktop computer, a laptop computer, a mobile phone, a smartphone, a tablet computer, a multimedia player, a smart home appliance, an artificial intelligence device, a smart wearable device, an e-reader, Smart vehicle equipment or Internet of Things equipment, etc.
- Database system 02 is used to receive instructions sent by client 01 and perform operations indicated by the instructions.
- the database system 02 is configured to receive an index creation instruction, and create an index based on the index creation instruction according to the index creation method provided in the embodiment of the present application.
- the database system 02 is used to receive data access instructions and provide feedback based on the data access instructions.
- the database system 02 can be implemented by a computing device.
- the computing device can be a server (such as a cloud server).
- the database system 02 can be a server cluster composed of several servers, or a cloud computing service center.
- a large number of basic resources owned by cloud service providers are deployed in the cloud computing service center.
- computing resources, storage resources, network resources, etc. are deployed in a cloud computing service center.
- the cloud computing service center can utilize this large amount of basic resources to implement the index creation method provided in the embodiments of this application.
- the cloud platform can use the resources in the cloud computing center to provide the user with the index creation method. Indexed cloud service. After users purchase the index-creating cloud service on the cloud platform, they can use the index-creating cloud service to create indexes for the data recorded in the database system to speed up the data search process.
- the cloud platform may be a central cloud cloud platform, an edge cloud cloud platform, or a cloud platform including a central cloud and an edge cloud, which are not specifically limited in the embodiments of this application.
- the database system 02 can also be implemented through other resource platforms besides the cloud platform, which is not specifically limited in the embodiments of this application. At this time, the database system 02 can be implemented through resources in other resource platforms and provide relevant database services to users.
- FIG. 2 is a schematic structural diagram of a database system provided by an embodiment of the present application.
- the database system 02 includes: a computing node 021 and a storage node 022.
- the storage node 022 stores a data table, and the data table records data with multiple rows and columns.
- the computing node 021 and the storage node 022 may be implemented by computing devices in a computing device cluster.
- the computing device cluster is also configured with a storage pool, and the storage pool is used to store data tables.
- the storage node 022 is used to determine the instruction information of the target data required to create an index, and the target data is part of the data in the target data table.
- the storage node 022 is also used to obtain target data from the target data table based on the instruction information, and provide the target data to the computing node 021.
- Compute node 021 is used to create indexes based on target data.
- the computing node 021 is also configured to receive an index creation instruction, determine instruction information based on the index creation instruction, and provide instruction information to the storage node 022.
- the index creation instruction instructs to create an index based on the target data.
- the computing node 021 is specifically configured to provide instruction information to the storage node 022 when the first consumption and the second consumption corresponding to the target data meet specified conditions.
- the first consumption is that the storage node 022 obtains the target data based on the target data table, And the consumption generated by providing the target data to the computing node 021.
- the second consumption is the consumption generated by the storage node 022 providing the target data table to the computing node 021, and the computing node 021 obtaining the target data based on the target data table.
- the computing node 021 is specifically configured to send a data acquisition request to the storage node 022, and the data acquisition request is used to request the storage node 022 to provide the target data indicated by the indication information to the computing node 021.
- the target data includes: data recorded in the specified data unit of the target data table, and the data unit is a data row or a data column.
- the target data includes: partial data recorded in the specified data unit of the target data table.
- part of the data is prefix data, intermediate data, suffix data or data of a specified length of the data recorded in the specified data unit.
- the database system 02 may also include other nodes to implement other functions or to assist in realizing the functions of the storage node 022 and the computing node 021.
- the database system 02 may also include a management node 023, which is used to manage the storage node 022 and the computing node 021 to ensure that the database system 02 can operate normally.
- the storage node 022, the computing node 021, and the management node 023 can all be implemented by software, or can be implemented by hardware.
- the implementation of storage node 022 is introduced next.
- the implementation of the computing node 021 and the management node 023 can refer to the implementation of the storage node 022.
- storage node 022 may include code running on a computing instance.
- the computing instance may be at least one of a physical host (computing device), a virtual machine, a container, and other computing devices. Further, the above computing device may be one or more.
- storage node 022 may include code running on multiple hosts/virtual machines/containers. It should be noted that multiple hosts/virtual machines/containers used to run the application can be distributed in the same region (region) or in different regions. Multiple hosts/VMs/containers used to run the code can be distributed in the same availability zone (AZ) or in different AZs, each AZ including a data center or multiple geographical locations Close data center. Among them, usually a region Can include multiple AZs.
- AZ availability zone
- the multiple hosts/VMs/containers used to run the code can be distributed in the same virtual private cloud (VPC), or across multiple VPCs.
- VPC virtual private cloud
- Cross-region communication between two VPCs in the same region or between VPCs in different regions requires a communication gateway in each VPC, and the interconnection between VPCs is realized through the communication gateway.
- the storage node 022 may include at least one computing device, such as a server.
- the storage node 022 may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD).
- ASIC application-specific integrated circuit
- PLD programmable logic device
- the above-mentioned PLD can be a complex programmable logical device (CPLD), a field-programmable gate array (field-programmable gate array, FPGA), a general array logic (generic array logic, GAL), or any combination thereof.
- CPLD complex programmable logical device
- FPGA field-programmable gate array
- GAL general array logic
- Multiple computing devices included in the storage node 022 may be distributed in the same region or in different regions. Multiple computing devices included in the storage node 022 may be distributed in the same AZ or in different AZs. Similarly, multiple computing devices included in the storage node 022 may be distributed in the same VPC or in multiple VPCs. The multiple computing devices may be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.
- the storage node obtains the target data required to create an index from the target data table and provides the target data to the computing node.
- the data recorded in the target data table reduces the amount of data transmitted from the storage node to the computing node and helps improve the I/O performance between the storage node and the computing node.
- the computing node is not required to perform the operation of obtaining the target data from the target data table, which reduces the computing load of the computing node and helps to improve the efficiency of index creation by the computing node and the computing performance of the computing node.
- Figure 4 is a flow chart of a method for creating an index through the database system provided by an embodiment of the present application. As shown in Figure 4, the method includes the following steps:
- Step 401 The computing node receives the index creation instruction, and determines the instruction information of the target data required to create the index based on the index creation instruction.
- the index creation instruction instructs to create an index based on the target data, and the target data is the part of the target data table indicated by the index creation instruction. data.
- a user When a user needs to create an index for database data, he or she can perform a specified operation on the client used by the user to trigger an index creation instruction, and the index creation instruction is used to instruct the index to be created.
- the client After the client generates the index creation instruction based on the user's operation, it will send the index creation instruction to the database, and the computing node can receive the index creation instruction.
- Indexes are created in the database to facilitate searching of data in the database.
- Index creation instructions indicate the data on which the index needs to be created.
- the indication may be represented by indication information.
- the computing node can obtain the instruction information based on the index creation instruction and obtain the instruction information of the target data required to create the index.
- the index creation instruction can carry indication information, and the computing node can extract the indication information from the index creation instruction.
- the index creation instruction can be ALTER TABLE t1ADD KEY(a, c).
- the index creation instruction instructs to create an index based on data column a and data column c of data table t1, that is, the instruction information indicates data column a and data of data table t1. If the data in column c is specified, the computing node can extract the indication information from the index creation instruction.
- the index needs to be created based on the primary key data in the data table.
- the data indicated by the index creation instruction may or may not include primary key data.
- the index creation instruction does not indicate the primary key data
- the computing node receives the index creation instruction, it can also determine the primary key data required to create the index based on the data indicated by the index creation instruction, and
- the indication information carries information indicating the primary key data.
- the index creation instruction is ALTER TABLE t1ADD KEY(a, c). This index creation instruction instructs to create an index based on data column a and data column c of data table t1.
- this scenario requires creating an index based on the primary key data of data table t1, and the data column d of data table t1 is used to record the primary key data of data table t1. Then the instruction information obtained by the computing node not only indicates the data column a of data table t1. and the data in data column c, also indicates the data in data column d.
- the embodiments of the present application can also be applied to scenarios where primary key data is not required for index creation.
- an index can be created based on some identification information without creating an index based on primary key data.
- the embodiments of the present application can also be applied to these scenarios.
- the target data is part of the data in the target data table indicated by the index creation instruction.
- the target data may include data recorded in a specified data unit of the target data table, and the data unit may be a data row or a data column. data column.
- the target data can be the data recorded in the specified data column of the target data table.
- the target data may specifically include: partial data recorded in the specified data unit of the target data table.
- the part of the data may be prefix data, intermediate data, suffix data or data of a specified length of the data recorded in the specified data unit.
- the target data It can be the prefix data of the data recorded in the data row corresponding to the specified data column of the target data table.
- the index creation instruction can be ALTER TABLE t1ADD KEY(a(10),c).
- This index creation instruction instructs to create an index based on the prefix data of length 10 and data column c in the data row corresponding to data column a of data table t1. , that is, the instruction information indicates the prefix data with a length of 10 in the data row corresponding to data column a of data table t1 and the data in data column c.
- the storage node obtains the target data from the target data table and provides the target data to the computing node, which can further reduce storage
- the amount of data transmitted by the node to the computing node reduces the computing load of the computing node, thereby further improving the efficiency of index creation and the computing performance of the computing node.
- Step 402 The computing node provides instruction information to the storage node.
- the computing node After the computing node obtains the indication information, it can provide the indication information to the storage node, so that the storage node provides the target data indicated by the indication information to the computing node. Alternatively, after determining the indication information, the computing node may determine whether to send the indication information to the storage node based on the indication information, and when it is necessary to obtain the target data through the storage node, provide the indication information to the storage node. In one implementation, the computing node can obtain the first consumption and the second consumption corresponding to the target data, and when the first consumption and the second consumption meet specified conditions, send the indication information to the storage node.
- the instruction information is not sent to the storage node, but the storage node is requested to provide the entire target data table recording the target data to the computing node.
- the first consumption is the consumption caused by the storage node obtaining the target data based on the target data table and providing the target data to the computing node.
- the second consumption is the consumption caused by the storage node providing the target data table to the computing node, and the computing node obtains the target based on the target data table. Consumption of data generation.
- the specified conditions can be determined according to application requirements. For example, the specified condition may be that the first consumption is less than the second consumption.
- the specified condition can be the difference between the second consumption and the first consumption. The value is greater than the specified threshold.
- the computing node can send instruction information to the storage node in the form of an I/O request.
- the computing node sends a data acquisition request to the storage node, and the data acquisition request requests the storage node to provide target data indicated by the indication information to the computing node.
- the storage node can support near data processing (NDP) technology, and the computing node and the storage node can communicate through the NDP context structure.
- NDP near data processing
- the computing node determines the indication information it can construct an NDP context structure based on the indication information, so as to transmit the indication information through the NDP context structure.
- the data acquisition request may include the NDP context structure and content instructing the storage node to initiate a full table scan of the target data table.
- Step 403 The storage node determines the instruction information of the target data required to create the index.
- the storage node After receiving the instruction information, the storage node can obtain the target data from the target data table indicated by the instruction information based on the instruction information, and provide the target data to the computing node. For example, when the data acquisition request sent by the computing node includes the NDP context structure and content instructing the storage node to initiate a full table scan of the target data table, the storage node can obtain the instruction from the NDP context structure after receiving the data acquisition request. Information, it is determined that a full table scan of the target data table is required and the target data is obtained.
- Step 404 The storage node obtains target data from the target data table based on the instruction information.
- the storage node After the storage node obtains the instruction information, it can perform a full table scan on the target data table indicated by the instruction information, and traverse the data rows and data columns in each relevant page of the target data table to obtain the target data.
- the storage node can use NDP technology to obtain target data from the target data table.
- NDP technology is generally considered for use in database selection (SELECT) and data manipulation language (DML) scenarios, but whether it can be applied in SELECT and DML scenarios also depends on the structure used in the scenario. Structured query language (SQL).
- SQL Structured query language
- the NDP technology can be used to obtain target data from the target data table without considering too many factors. Its usage scenario coverage is basically 100%, which can significantly Reduce the I/O in the data table reading phase. This effect is particularly obvious in scenarios where multiple users share storage and computing resources (multi-tenant scenarios on cloud platforms).
- the operation of the storage node to obtain the target data from the target data table can be called a pruning operation of the target data table.
- the operation of obtaining the target data from the target data table may be called a column pruning operation.
- the operation of obtaining the target data from the target data table may be called a column content clipping operation.
- the storage node performs a clipping operation on the target data table to obtain the target data and provides the target data to the computing node, which can reduce the amount of data transmitted from the storage node to the computing node and reduce the amount of I/O between the storage node and the computing node. Reduce the I/O overhead between storage nodes and computing nodes and achieve accurate I/O between storage nodes and computing nodes. This effect is especially obvious when obtaining target data through column content clipping.
- Step 405 The storage node provides target data to the computing node.
- the storage node After the storage node obtains the target data, it can store the target data in a data structure and provide the data structure to the computing node, so that the computing node obtains the target data. After the storage node obtains the target data from each page of the target data table through the clipping operation, it can provide the clipped page to the data node.
- the clipped page can be regarded as a compressed page of the original page, but through this application
- the compressed page obtained by the cropping operation provided in the embodiment is different from the compressed page obtained by the compression technology.
- the data in the compressed page obtained by cropping only includes the data in the data unit specified by the indication information, while the compressed page obtained by the compression technology may also include data in other data units.
- the compression rate of the compressed page obtained by cropping relative to the target data table can be significantly greater than the compression rate of the compressed page obtained by the compression technology.
- Step 406 The computing node creates an index based on the target data.
- the computing node After the computing node obtains the target data provided by the storage node, it can create an index based on the target data. For example, when the target data is the data recorded in the specified data column of the target data table, after the computing node obtains the target data, it can read the data recorded in each data column from each data row of the target data, and calculate the data based on the target data. The data recorded in each data row and each data column constitutes a sub-record and is stored independently. Then all sub-records are sorted, and the indexing operation is performed based on the sorted sub-records.
- the index can be stored in a data structure such as a B-tree.
- the computing node when the target data is the data recorded in the specified data column of the target data table, and the target data is presented in the form of a compressed page, after the computing node receives the compressed page sent by the storage node, it can parse the data rows of the compressed page to Get target data.
- the computing node By obtaining the target data from the storage node, the computing node does not need to perform the operation of obtaining the target data from the target data table, which reduces the computing load of the computing node and helps to improve the efficiency of index creation by the computing node and the computing performance of the computing node.
- data table t1 includes 24 data columns, namely data columns a, b, c,...x.
- the string length stored in data column a and data column b is 100 bytes, and the remaining data columns store The string length is 4, and the data recorded in data column c is the primary key data.
- the storage node can remove the data columns b, d, e,..., x in the data table t1 through column pruning, and obtain the targets recorded in the data columns a and c.
- the storage node can remove data columns b, d, e,...,x and the 11th to 100 bytes in data column a in data table t1 through column pruning and column content pruning, and obtain data column a.
- the prefix data with a length of 10 and the target data recorded in the data column c, for each data row, the total length of the target data is 10+4 14 bytes.
- the width of the data table is wider, for example, the fields recorded in the data table are more complex, and the data table includes more data columns, the amount of I/O that can be reduced through the optimization methods provided by the embodiments of this application will be greater.
- the data lines were not Header information is included. Since the data volume of header information is generally small, and column trimming or column content trimming of header information can also reduce the data volume (such as 6-8 bytes), so even if it is included in the header Information can still achieve better results through this optimization.
- the storage node is used to determine the instruction information of the target data required to create the index, and based on the instruction information, obtain the target data from the target data table and provide it to the calculation Nodes provide target data, and compute nodes are used to create indexes based on the target data.
- the target data is part of the data in the target data table.
- the storage node obtains the target data required to create an index from the target data table and provides the target data to the computing node. Compared with related technologies, there is no need for the storage node to transmit the entire target data table recorded to the computing node.
- the computing node is not required to perform the operation of obtaining the target data from the target data table, which reduces the computing load of the computing node and helps to improve the efficiency of index creation by the computing node and the computing performance of the computing node.
- An embodiment of the present application also provides a storage node.
- the storage node stores a data table, and the data table records data with multiple rows and columns.
- the storage node 022 includes:
- Processing module 0221 is used to determine the instruction information of the target data required to create the index.
- the target data is part of the data in the target data table.
- the processing module 0221 is also used to obtain target data from the target data table based on the instruction information.
- Interaction module 0222 used to provide target data to computing nodes.
- the interaction module 0222 is also used to receive indication information provided by the computing node.
- the interaction module 0222 is specifically configured to receive a data acquisition request sent by the computing node.
- the data acquisition request is used to request the storage node to provide the target data indicated by the indication information to the computing node.
- the target data includes: data recorded in the specified data unit of the target data table, and the data unit is a data row or a data column.
- the target data includes: partial data recorded in the specified data unit of the target data table.
- part of the data is prefix data, intermediate data, suffix data or data of a specified length of the data recorded in the specified data unit.
- computing node 021 includes:
- the interaction module 0211 is used to receive target data sent by the storage node.
- the target data is part of the data in the target data table stored in the storage node.
- the target data table records multiple rows and columns of data.
- Processing module 0212 used to create indexes based on target data.
- the interaction module 0211 is also configured to receive an index creation instruction, which instructs to create an index based on the target data.
- the processing module 0212 is also used to determine indication information based on the index creation instruction.
- the interaction module 0211 is also used to provide instruction information to the storage node.
- the interaction module 0211 is specifically configured to provide instruction information to the storage node when the first consumption and the second consumption corresponding to the target data meet the specified conditions.
- the first consumption is that the storage node obtains the target data based on the target data table and sends it to the storage node.
- the consumption caused by the computing node providing the target data, the second consumption is the consumption caused by the storage node providing the target data table to the computing node, and the computing node obtaining the target data based on the target data table.
- the interaction module 0211 is specifically configured to send a data acquisition request to the storage node.
- the data acquisition request is used to request the storage node to provide the target data indicated by the indication information to the computing node.
- the target data includes: data recorded in the specified data unit of the target data table, and the data unit is a data row or a data column.
- the target data includes: partial data recorded in the specified data unit of the target data table.
- part of the data is prefix data, intermediate data, suffix data or data of a specified length of the data recorded in the specified data unit.
- processing module 0221, the interaction module 0222, the interaction module 0211 and the processing module 0212 can all be implemented by software, or can be implemented by hardware.
- the following takes processing module 0221 as an example to introduce the implementation of processing module 0221. Similar, pay For the implementation of mutual module 0222, interaction module 0211 and processing module 0212, please refer to the implementation of processing module 0221.
- the processing module 0221 may include code running on a computing instance.
- the computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Furthermore, the above computing instance may be one or more.
- processing module 0221 may include code running on multiple hosts/virtual machines/containers. It should be noted that multiple hosts/virtual machines/containers used to run the code can be distributed in the same region or in different regions. Furthermore, multiple hosts/virtual machines/containers used to run the code can be distributed in the same AZ or in different AZs. Each AZ includes one data center or multiple geographically close data centers. . Among them, usually a region can include multiple AZs.
- the multiple hosts/VMs/containers used to run the code can be distributed in the same virtual private cloud (VPC), or across multiple VPCs.
- VPC virtual private cloud
- Cross-region communication between two VPCs in the same region and between VPCs in different regions requires a communication gateway in each VPC, and the interconnection between VPCs is realized through the communication gateway. .
- the processing module 0221 may include at least one computing device, such as a server.
- the processing module 0221 may also be a device implemented using ASIC, or a PLD, or the like.
- the above-mentioned PLD can be implemented by CPLD, FPGA, GAL or any combination thereof.
- Multiple computing devices included in the processing module 0221 may be distributed in the same region or in different regions. Multiple computing devices included in the processing module 0221 may be distributed in the same AZ or in different AZs. Similarly, multiple computing devices included in the processing module 0221 may be distributed in the same VPC or in multiple VPCs. The multiple computing devices may be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.
- the processing module 0221 can be used to perform any steps performed by the storage node in the method of creating an index
- the interaction module 0222 can be used to perform any steps performed by the storage node in the method of creating an index
- Interaction Module 0211 can be used to perform any steps performed by the computing node in the method of creating an index
- processing module 0212 can be used to perform any steps performed by the computing node in the method of creating an index.
- the steps that the processing module 0221, the interaction module 0222, the interaction module 0211 and the processing module 0212 are responsible for can be specified as needed.
- the processing module 0221 and the interaction module 0222 respectively implement different steps in the method of creating an index to realize all the functions of the storage node.
- the interaction module 0211 and the processing module 0212 respectively implement different steps in the method of creating an index to realize all functions of the computing node.
- the embodiment of this application also provides a method for creating an index.
- This method applies to storage nodes.
- the storage node stores a data table, and the data table records data with multiple rows and columns.
- the method includes:
- Step 701 The storage node determines the instruction information of the target data required to create an index.
- the target data is part of the data in the target data table.
- Step 702 The storage node obtains target data from the target data table based on the indication information, and provides the target data to the computing node.
- the method before the storage node determines the instruction information of the target data required to create the index, the method also includes: step 703: the storage node receives the instruction information provided by the computing node.
- the storage node receives the instruction information provided by the computing node, including: the storage node receives a data acquisition request sent by the computing node, and the data acquisition request is used to request the storage node to provide the target data indicated by the instruction information to the computing node.
- the target data includes: data recorded in the specified data unit of the target data table, and the data unit is a data row or a data column.
- the target data includes: partial data recorded in the specified data unit of the target data table.
- part of the data is prefix data, intermediate data, suffix data or data of a specified length of the data recorded in the specified data unit.
- the embodiment of this application also provides a method for creating an index. This method applies to compute nodes. As shown in Figure 8, the method includes:
- Step 801 The computing node receives the target data sent by the storage node.
- the target data is part of the data in the target data table stored in the storage node.
- the target data table records multiple rows and columns of data.
- Step 802 The computing node creates an index based on the target data.
- the method before the computing node receives the target data sent by the storage node, the method also includes: step 803.
- the computing node receives the index creation instruction, determines the indication information based on the index creation instruction, and provides the storage node with Instruction information, the index creation instruction instructs to create an index based on the target data.
- the computing node provides instruction information to the storage node, including: when the first consumption and the second consumption corresponding to the target data meet the specified When conditions exist, instruction information is provided to the storage node.
- the first consumption is when the storage node obtains the target data based on the target data table and provides the target data to the computing node.
- the second consumption is when the storage node provides the target data table to the computing node. The computing node obtains the consumption of target data based on the target data table.
- the computing node provides the instruction information to the storage node, including: sending a data acquisition request to the storage node.
- the data acquisition request is used to request the storage node to provide the target data indicated by the instruction information to the computing node.
- the target data includes: data recorded in the specified data unit of the target data table, and the data unit is a data row or a data column.
- the target data includes: partial data recorded in the specified data unit of the target data table.
- part of the data is prefix data, intermediate data, suffix data or data of a specified length of the data recorded in the specified data unit.
- FIG. 9 is a schematic structural diagram of a computing device provided by an embodiment of the present application.
- the computing device 900 includes a processor 901 , a memory 902 , a communication interface 903 and a bus 904 .
- the processor 901, the memory 902, and the communication interface 903 implement communication connections between each other through the bus 904.
- Computing device 900 may be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in the computing device 900.
- Processor 901 may include a general-purpose processor and/or a special-purpose hardware chip.
- a general-purpose processor may include any one or more of a central processing unit (CPU), a microprocessor (MP), or a graphics processing unit (GPU).
- the CPU is, for example, a single-core processor (single-CPU) or a multi-core processor (multi-CPU).
- a dedicated hardware chip is a high-performance processing hardware module. Specialized hardware chips include digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA) or network processor (network processor, at least one of NP).
- the processor 901 may also be an integrated circuit chip with signal processing capabilities. During the implementation process, part or all of the functions of the method of creating an index in this application can be completed by instructions in the form of hardware integrated logic circuits or software in the processor 901 .
- the memory 902 is used to store computer programs, which include an operating system 902a and executable codes (ie, program instructions) 902b.
- the memory 902 is, for example, a read-only memory or other type of static storage device that can store static information and instructions, or a random access memory or other type of dynamic storage device that can store information and instructions, or an electrically erasable programmable memory device.
- the memory 902 is used to store outbound port queues, etc.
- the memory 902 exists independently, for example, and is connected to the processor 901 through a bus 904 . Or the memory 902 and the processor 901 are integrated together.
- memory 902 may include volatile memory, such as random access memory (RAM).
- the processor 901 may also include non-volatile memory (non-volatile memory), such as read-only memory (ROM), flash memory, mechanical hard disk (hard disk drive, HDD) or solid state drive (solid state drive, SSD).
- ROM read-only memory
- HDD hard disk drive
- SSD solid state drive
- the memory 902 can store executable code.
- the processor 901 is used to implement the function of the aforementioned storage node, thereby realizing the storage in the method of creating an index provided by the embodiment of the present application.
- Some or all of the functionality of the node that is to say, the memory 902 stores instructions for implementing part or all of the functions of the storage node in the method of creating an index, or the processor 901 is used to implement the functions of the aforementioned computing node, thereby realizing the index creation provided by the embodiment of the present application. Compute some or all of the functionality of a node in a method.
- the memory 902 stores instructions for implementing part or all of the functions of the computing node in the method of creating an index.
- the memory 902 may also include operating systems and other software modules and data required for running processes.
- the communication interface 903 uses transceiver modules such as, but not limited to, network interface cards and transceivers to implement communication with other devices or communication networks.
- the communication interface 903 may be any one or any combination of the following devices: a network interface (such as an Ethernet interface), a wireless network card, and other devices with network access functions.
- Bus 904 is any type of communication bus used to interconnect internal components of a computing device (eg, memory 902, processor 901, communication interface 903).
- bus 904 may be a peripheral component interconnect (PCI) standard Bus or extended industry standard architecture (EISA) bus, etc.
- the bus can be divided into address bus, data bus, control bus, etc. For ease of presentation, only one line is used in Figure 9, but it does not mean that there is only one bus or one type of bus.
- Bus 904 may include a path that carries information between various components of computing device 900 (eg, memory 902, processor 901, communications interface 903).
- the embodiment of the present application takes the interconnection of the above-mentioned devices inside the computing device through the bus 904 as an example.
- the above-mentioned devices inside the computing device 900 may also use other connection methods besides the bus 904 to communicate with each other.
- the above-described devices within the computing device 900 are interconnected through internal logical interfaces.
- the above-mentioned plurality of devices can be respectively arranged on independent chips, or at least part or all of them can be arranged on the same chip. Whether each device is independently installed on different chips or integrated on one or more chips often depends on the needs of product design.
- the embodiments of this application do not limit the specific implementation forms of the above devices.
- the descriptions of the processes corresponding to each of the above drawings have different emphases. For parts that are not detailed in a certain process, you can refer to the relevant descriptions of other processes.
- An embodiment of the present application also provides a computing device cluster.
- the computing device cluster includes at least one computing device.
- the computing device may be a server, such as a central server, an edge server, or a local server in a local data center.
- the computing device may also be a terminal device such as a desktop computer, a laptop computer, or a smartphone.
- the structure of at least one computing device included in the computing device cluster may refer to the computing device 900 shown in FIG. 9 .
- the same instructions for performing the method of creating an index may be stored in the memory 902 of one or more computing devices 900 in a cluster of computing devices.
- the memory 902 of one or more computing devices 900 in the computing device cluster may also store part of the instructions for executing the method of creating an index.
- a combination of one or more computing devices 900 may collectively execute instructions for performing a method of creating an index.
- the memories 902 in different computing devices 900 in the computing device cluster may store different instructions, respectively used to implement part of the functions of the method of creating an index. That is, the instructions stored in the memory 902 in different computing devices 900 can implement the functions of one or more modules in the storage node and the computing node.
- one or more computing devices in a cluster of computing devices may be connected through a network.
- the network can be a wide area network or a local area network, etc.
- Figure 10 shows a possible implementation.
- two computing devices 1000A and 1000B are connected through a network.
- the connection to the network is made through a communication interface in each computing device.
- computing devices 1000A and 1000B include a bus 1002, a processor 1004, a memory 1006, and a communication interface 1008.
- Memory 1006 in computing device 1000A stores instructions that implement the functions of the storage node.
- the memory 1006 in the computing device 1000B stores instructions for implementing the functions of the computing node.
- connection method between the computing device clusters shown in Figure 10 can be: considering that the index creation method provided by this application requires the transmission of target data and indication information, it is considered that the functions implemented by the storage nodes are handed over to the computing device 1000A, and The functions implemented by the computing nodes are executed by the computing device 1000B.
- computing device 1000A shown in FIG. 10 may also be performed by multiple computing devices 1000.
- computing device 1000B may also be performed by multiple computing devices 1000 .
- An embodiment of the present application also provides a computer-readable storage medium, which is a non-volatile computer-readable storage medium.
- Computer-readable storage media can be any available media that can be stored by a computing device or a data storage device such as a data center that contains one or more available media. Available media may be magnetic media (eg, floppy disk, hard disk, tape), optical media (eg, DVD), or semiconductor media (eg, solid state drive), etc.
- the computer-readable storage medium includes instructions that instruct the computing device to execute the method for creating an index provided by embodiments of the present application.
- An embodiment of the present application also provides a computer program product containing instructions.
- a computer program product may be a software or program product containing instructions capable of running on a computing device or stored in any available medium.
- the computer program product is run on at least one computing device, the computer is caused to implement the method for creating an index provided by the embodiment of the present application.
- Embodiments of the present application also provide a chip, including a processor, configured to call and run instructions stored in the memory, so that the computing device installed with the chip executes the method for creating an index provided by the embodiment of the present application.
- a computer program product includes one or more computer instructions.
- the computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
- Computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
- computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means.
- the computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. Available media can be magnetic media (e.g., floppy disk, hard disk, tape), optical media (e.g., DVD), or semiconductor media (e.g., solid-state drive Solid State Disk), etc.
- Computer program codes for implementing the methods of embodiments of the present application may be written in one or more programming languages. These computer program codes may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable rule-finding device, such that the program code, when executed by the computer or other programmable rule-finding device, causes the flowcharts and/or block diagrams to be displayed. The functions/operations specified in are implemented.
- the program code may execute entirely on the computer, partly on the computer, as a stand-alone software package, partly on the computer and partly on a remote computer or entirely on the remote computer or server.
- the computer program code or related data may be carried by any appropriate carrier, so that the device, device or processor can perform the various processes and operations described above.
- carriers include signals, computer-readable media, and the like.
- signals may include electrical, optical, radio, acoustic, or other forms of propagated signals, such as carrier waves, infrared signals, and the like.
- the disclosed systems, devices and methods can be implemented in other ways.
- the device embodiments described above are only illustrative.
- the division of the modules is only a logical function division. In actual implementation, there may be other division methods.
- multiple modules or components may be combined or may be Integrated into another system, or some features can be ignored, or not implemented.
- the coupling or direct coupling or communication connection between each other shown or discussed may be indirect coupling or communication connection through some interfaces, devices or modules, or may be electrical, mechanical or other forms of connection.
- the modules described as separate components may or may not be physically separated.
- the components shown as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the embodiments of the present application.
- each functional module in each embodiment of the present application can be integrated into one processing module, or each module can exist physically alone, or two or more modules can be integrated into one module.
- the above integrated modules can be implemented in the form of hardware or software function modules.
- first, second and other words are used to distinguish the same or similar items with basically the same functions and functions. It should be understood that the terms “first”, “second” and “nth” There is no logical or sequential dependency, and there is no limit on the number or execution order. It should also be understood that, although the following description uses the terms first, second, etc. to describe various elements, these elements should not be limited by the terms. These terms are only used to distinguish one element from another. For example, a first link may be referred to as a second link, and similarly, a second link may be referred to as a first link, without departing from the scope of various examples.
- the size of the sequence number of each process does not mean the order of execution.
- the execution order of each process should be determined by its function and internal logic, and should not be determined by the execution order of the embodiments of the present application.
- the implementation process constitutes no limitation.
- determining B based on A does not mean determining B only based on A, and B can also be determined based on A and/or other information.
- references throughout this specification to "one embodiment,” “an embodiment,” and “a possible implementation” mean that specific features, structures, or characteristics related to the embodiment or implementation are included herein. In at least one embodiment of the application. Therefore, “in one embodiment” or “in an embodiment” or “a possible implementation” appearing in various places throughout this specification do not necessarily refer to the same embodiment. Furthermore, the particular features, structures or characteristics may be combined in any suitable manner in one or more embodiments.
- the information including but not limited to user equipment information, user personal information, etc.
- data including but not limited to data used for analysis, stored data, displayed data, etc.
- signals involved in this application All are authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
- the instruction information and target data involved in this application were obtained with full authorization.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Mathematical Physics (AREA)
- Computational Linguistics (AREA)
- Probability & Statistics with Applications (AREA)
- Fuzzy Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
Claims (19)
- 一种数据库系统,其特征在于,所述数据库系统包括:计算节点和存储节点,所述存储节点存储有数据表,所述数据表记载有多行和多列数据;所述存储节点用于确定创建索引所需的目标数据的指示信息,所述目标数据为目标数据表中的部分数据;所述存储节点还用于基于所述指示信息,从所述目标数据表中获取所述目标数据,并向所述计算节点提供所述目标数据;所述计算节点用于基于所述目标数据创建索引。
- 如权利要求1所述的系统,其特征在于,所述计算节点还用于接收索引创建指令,基于所述索引创建指令确定所述指示信息,并向所述存储节点提供所述指示信息,所述索引创建指令指示基于所述目标数据创建索引。
- 如权利要求2所述的系统,其特征在于,所述计算节点具体用于在所述目标数据对应的第一消耗和第二消耗满足指定条件时,向所述存储节点提供所述指示信息,所述第一消耗为所述存储节点基于所述目标数据表获取所述目标数据,并向所述计算节点提供所述目标数据产生的消耗,所述第二消耗为所述存储节点向所述计算节点提供所述目标数据表,由所述计算节点基于所述目标数据表获取所述目标数据产生的消耗。
- 如权利要求2或3所述的系统,其特征在于,所述计算节点具体用于向所述存储节点发送数据获取请求,所述数据获取请求用于请求所述存储节点向所述计算节点提供所述指示信息指示的所述目标数据。
- 如权利要求1至4任一所述的系统,其特征在于,所述目标数据包括:所述目标数据表的指定数据单元中记载的数据,所述数据单元为数据行或数据列。
- 如权利要求5所述的系统,其特征在于,所述目标数据包括:所述目标数据表的指定数据单元中记载的部分数据。
- 如权利要求6所述的系统,其特征在于,所述部分数据为所述指定数据单元中记载的数据的前缀数据、中间数据、后缀数据或指定长度的数据。
- 如权利要求6或7所述的系统,其特征在于,所述指定数据单元中记载的数据的类型为字符串和/或大对象类字段。
- 一种创建索引的方法,其特征在于,该方法应用于数据库系统,所述数据库系统包括:计算节点和存储节点,所述存储节点存储有数据表,所述数据表记载有多行和多列数据,所述方法包括:所述存储节点确定创建索引所需的目标数据的指示信息,所述目标数据为目标数据表中的部分数据;所述存储节点基于所述指示信息,从所述目标数据表中获取所述目标数据,并向所述计算节点提供所述目标数据;所述计算节点基于所述目标数据创建索引。
- 如权利要求9所述的方法,其特征在于,在所述存储节点确定创建索引所需的目标数据的指示信息之前,所述方法还包括:所述计算节点接收索引创建指令,基于所述索引创建指令确定所述指示信息,并向所述存储节点提供 所述指示信息,所述索引创建指令指示基于所述目标数据创建索引。
- 如权利要求10所述的方法,其特征在于,所述计算节点向所述存储节点提供所述指示信息,包括:所述计算节点在所述目标数据对应的第一消耗和第二消耗满足指定条件时,向所述存储节点提供所述指示信息,所述第一消耗为所述存储节点基于所述目标数据表获取所述目标数据,并向所述计算节点提供所述目标数据产生的消耗,所述第二消耗为所述存储节点向所述计算节点提供所述目标数据表,由所述计算节点基于所述目标数据表获取所述目标数据产生的消耗。
- 如权利要求10或11所述的方法,其特征在于,所述计算节点向所述存储节点提供所述指示信息,包括:所述计算节点向所述存储节点发送数据获取请求,所述数据获取请求用于请求所述存储节点向所述计算节点提供所述指示信息指示的所述目标数据。
- 如权利要求9至12任一所述的方法,其特征在于,所述目标数据包括:所述目标数据表的指定数据单元中记载的数据,所述数据单元为数据行或数据列。
- 如权利要求13所述的方法,其特征在于,所述目标数据包括:所述目标数据表的指定数据单元中记载的部分数据。
- 如权利要求14所述的方法,其特征在于,所述部分数据为所述指定数据单元中记载的数据的前缀数据、中间数据、后缀数据或指定长度的数据。
- 如权利要求14或15所述的方法,其特征在于,所述指定数据单元中记载的数据的类型为字符串和/或大对象类字段。
- 一种计算设备集群,其特征在于,包括至少一个计算设备,每个计算设备包括处理器和存储器,所述至少一个计算设备的处理器用于执行所述至少一个计算设备的存储器中存储的指令,以使得所述计算设备集群执行如权利要求9至16任一项所述的方法。
- 一种包含指令的计算机程序产品,其特征在于,当所述指令被计算设备集群运行时,使得所述计算设备集群执行如权利要求9至16任一项所述的方法。
- 一种计算机可读存储介质,其特征在于,包括计算机程序指令,当所述计算机程序指令由计算设备集群执行时,所述计算设备集群执行如权利要求9至16任一项所述的方法。
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| EP23864434.8A EP4579478A4 (en) | 2022-09-15 | 2023-06-29 | INDEX CREATION METHOD AND DATABASE SYSTEM |
| US19/080,392 US20250209050A1 (en) | 2022-09-15 | 2025-03-14 | Index Creation Method and Database System |
Applications Claiming Priority (4)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211120347 | 2022-09-15 | ||
| CN202211120347.0 | 2022-09-15 | ||
| CN202211358798.8A CN117743318A (zh) | 2022-09-15 | 2022-11-01 | 创建索引的方法及数据库系统 |
| CN202211358798.8 | 2022-11-01 |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US19/080,392 Continuation US20250209050A1 (en) | 2022-09-15 | 2025-03-14 | Index Creation Method and Database System |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2024055695A1 true WO2024055695A1 (zh) | 2024-03-21 |
Family
ID=90274159
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2023/103975 Ceased WO2024055695A1 (zh) | 2022-09-15 | 2023-06-29 | 创建索引的方法及数据库系统 |
Country Status (3)
| Country | Link |
|---|---|
| US (1) | US20250209050A1 (zh) |
| EP (1) | EP4579478A4 (zh) |
| WO (1) | WO2024055695A1 (zh) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN118511167A (zh) * | 2022-03-02 | 2024-08-16 | 华为技术有限公司 | 数据库实体、始发数据库实体以及在数据库实体和始发数据库实体中使用的方法 |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110399375A (zh) * | 2019-07-24 | 2019-11-01 | 南京云白信息科技有限公司 | 一种数据表索引创建方法及装置 |
| CN114090589A (zh) * | 2022-01-20 | 2022-02-25 | 苏州浪潮智能科技有限公司 | 基于HBase的数据查询方法、装置和计算机设备 |
| US11327937B1 (en) * | 2015-09-18 | 2022-05-10 | Amazon Technologies, Inc. | Determining indexing progress for a table in a distributed data store |
Family Cites Families (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP5108252B2 (ja) * | 2006-04-27 | 2012-12-26 | 株式会社日立製作所 | インデクス更新方法及びそのシステム |
| US8510290B1 (en) * | 2008-12-30 | 2013-08-13 | Teradata Us, Inc. | Index selection in a multi-system database management system |
| JP6717152B2 (ja) * | 2016-10-06 | 2020-07-01 | 富士通株式会社 | インデックス生成プログラム、インデックス生成装置、インデックス生成方法、検索プログラム、検索装置および検索方法 |
| JP6871504B2 (ja) * | 2016-12-27 | 2021-05-12 | 富士通株式会社 | 情報処理装置、データロードプログラム及びデータロード方法 |
| CN108287835B (zh) * | 2017-01-09 | 2022-06-21 | 腾讯科技(深圳)有限公司 | 一种数据清理方法及装置 |
| US20200233882A1 (en) * | 2019-01-18 | 2020-07-23 | Huawei Technologies Co., Ltd. | Bucketizing data into buckets for processing by code modules |
-
2023
- 2023-06-29 EP EP23864434.8A patent/EP4579478A4/en active Pending
- 2023-06-29 WO PCT/CN2023/103975 patent/WO2024055695A1/zh not_active Ceased
-
2025
- 2025-03-14 US US19/080,392 patent/US20250209050A1/en active Pending
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US11327937B1 (en) * | 2015-09-18 | 2022-05-10 | Amazon Technologies, Inc. | Determining indexing progress for a table in a distributed data store |
| CN110399375A (zh) * | 2019-07-24 | 2019-11-01 | 南京云白信息科技有限公司 | 一种数据表索引创建方法及装置 |
| CN114090589A (zh) * | 2022-01-20 | 2022-02-25 | 苏州浪潮智能科技有限公司 | 基于HBase的数据查询方法、装置和计算机设备 |
Non-Patent Citations (1)
| Title |
|---|
| See also references of EP4579478A4 |
Also Published As
| Publication number | Publication date |
|---|---|
| US20250209050A1 (en) | 2025-06-26 |
| EP4579478A1 (en) | 2025-07-02 |
| EP4579478A4 (en) | 2025-12-17 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US12153575B2 (en) | Database query splitting | |
| CN110019080B (zh) | 数据访问方法和装置 | |
| WO2023273544A1 (zh) | 日志文件的存储方法、装置、设备和存储介质 | |
| US11310316B2 (en) | Methods, devices and computer program products for storing and accessing data | |
| CN113839977A (zh) | 消息推送方法、装置、计算机设备及存储介质 | |
| US10866960B2 (en) | Dynamic execution of ETL jobs without metadata repository | |
| CN113688160B (zh) | 数据处理方法、处理装置、电子设备及存储介质 | |
| US20220300503A1 (en) | Querying distributed databases | |
| US9367620B2 (en) | Local context search results improvements | |
| CN112583941A (zh) | 一种支持接入多电力终端的方法、单元节点及电力物联网 | |
| CN107480205A (zh) | 一种进行数据分区的方法和装置 | |
| US20250209050A1 (en) | Index Creation Method and Database System | |
| CN103902614B (zh) | 一种数据处理方法、设备和系统 | |
| WO2024055715A1 (zh) | 大数据集群部署方案的确定方法、装置、集群和存储介质 | |
| CN114637969A (zh) | 目标对象的鉴权方法及装置 | |
| US20170364293A1 (en) | Method and apparatus for data processing | |
| US10628416B2 (en) | Enhanced database query processing | |
| CN111444017A (zh) | 多媒体数据处理方法、装置、系统、电子设备及存储介质 | |
| CN109213815B (zh) | 控制执行次数的方法、装置、服务器终端以及可读介质 | |
| CN117743318A (zh) | 创建索引的方法及数据库系统 | |
| CN116185530A (zh) | 一种页面分享方法、装置及介质 | |
| CN115687340A (zh) | 业务查询方法、装置、设备及存储介质 | |
| US10503731B2 (en) | Efficient analysis of distinct aggregations | |
| US20260003894A1 (en) | Data processing method and apparatus | |
| US12367070B1 (en) | Method for managing storage instances in a multi cluster environment and a system thereof |
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: 23864434 Country of ref document: EP Kind code of ref document: A1 |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 2023864434 Country of ref document: EP |
|
| ENP | Entry into the national phase |
Ref document number: 2023864434 Country of ref document: EP Effective date: 20250324 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| WWP | Wipo information: published in national office |
Ref document number: 2023864434 Country of ref document: EP |