Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Secondary index creation method and device for horizontal partition table, equipment and storage medium

A secondary index and horizontal partitioning technology, applied in the database field, can solve problems such as reducing parallel efficiency, high coupling between producers and consumers, and not really improving index data filling efficiency, so as to improve efficiency and user experience.

Pending Publication Date: 2022-03-11
SHANGHAI DAMENG DATABASE
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] It can be seen that async asynchronous index creation does not really improve the efficiency of index data filling, but only splits the index creation into two parts; parallel specifies the degree of parallelism to create an index is to hand over one SQL to multiple processes to complete the work together, using N times Resource consumption in exchange for time, however, the index b-tree must be filled with data in an orderly manner, and when the index data is filled, the coupling between the producer and the consumer is too high, which will reduce the parallel efficiency

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Secondary index creation method and device for horizontal partition table, equipment and storage medium
  • Secondary index creation method and device for horizontal partition table, equipment and storage medium
  • Secondary index creation method and device for horizontal partition table, equipment and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0026] figure 1 It is a flow chart of a method for creating a secondary index of a horizontal partition table provided by Embodiment 1 of the present invention. This embodiment is applicable to situations where the efficiency of creating a secondary index is low. The level index creation device can be used to implement the device, which can be implemented in hardware and / or software, and can usually be configured in computer equipment. Specifically include the following steps:

[0027] S110. After receiving the secondary index creation instruction, set the index state of the secondary index of the partition root table in the horizontal partition table corresponding to the instruction to an invalid state.

[0028] Wherein, the secondary index creation instruction can be understood as an instruction generated when the secondary index of the horizontal partition table is created.

[0029] In this embodiment, the horizontal partition table can be understood as splitting a table ...

Embodiment 2

[0053] figure 2 It is a flow chart of a method for creating a secondary index of a horizontal partition table provided by Embodiment 2 of the present invention. This embodiment further refines the above-mentioned embodiments on the basis of each. Specifically, the following steps may be included:

[0054] S210. After receiving the secondary index creation instruction, set the index state of the secondary index of the partition root table in the horizontal partition table corresponding to the instruction to an invalid state.

[0055] S220. Obtain the number of tasks specified by the user in advance; or,

[0056] Determine the number of asynchronous subtasks according to the database operating environment, the number of leaf-level partition sub-tables in the horizontal partition table, and the data volume of each leaf-level partition sub-table.

[0057] Wherein, the database operating environment may include relevant information such as the operating system where the database...

Embodiment 3

[0123] Figure 4 It is a schematic structural diagram of a device for creating a secondary index of a horizontal partition table provided in Embodiment 3 of the present invention. The device for creating a secondary index of a horizontal partition table provided in this embodiment can be implemented by software and / or hardware. It can be configured in a server to implement a method for creating a secondary index of a horizontally partitioned table in an embodiment of the present invention. like Figure 4 As shown, the device may specifically include: a state setting module 410 , a data filling module 420 and an index obtaining module 430 .

[0124] Wherein, the state setting module 410 is configured to set the index state of the secondary index of the partition root table in the horizontal partition table corresponding to the instruction to an invalid state after receiving the secondary index creation instruction.

[0125] The data filling module 420 is configured to fill th...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a method, a device and equipment for creating a secondary index of a horizontal partition table and a storage medium. The method comprises the steps that after a secondary index creating instruction is received, the index state of a secondary index of a partition root table in a horizontal partition table corresponding to the instruction is set to be an invalid state; performing index data filling on secondary indexes of corresponding leaf layer partition sub-tables in the horizontal partition table through the distributed asynchronous sub-tasks; and after detecting that each leaf layer partition sub-table completes index data filling, setting the index state of the secondary index of the partition root table as an effective state, and obtaining the secondary index. According to the embodiment of the invention, the index data filling is carried out on the secondary index of the corresponding leaf layer partition sub-table in the horizontal partition table through the distributed asynchronous sub-task, so that the problem that the time consumption is relatively long when the secondary index is created is solved, the efficiency of creating the secondary index is improved, and the user experience is improved.

Description

technical field [0001] The embodiments of the present invention relate to the field of databases, and in particular to a method, device, device and storage medium for creating a secondary index of a horizontal partition table. Background technique [0002] When the data volume of the partition table is very large, it takes a long time to create the secondary index. The solutions of major database vendors mainly include: async asynchronous index creation and parallel index creation with specified parallelism. Among them, the async asynchronous index creation of the Hbase database can be divided into two steps: the first step is to use the async method to create an asynchronous index. After the execution is completed, the index status is invalid, and there is no data in the index; the second step is to fill the index data into The target file, after the execution is completed, the index is updated to a valid state. During the process of creating an index asynchronously, if t...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F16/22
CPCG06F16/2264
Inventor 望声宜韩朱忠
Owner SHANGHAI DAMENG DATABASE
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products