CN115168499B - Database table fragmentation method and device, computer equipment and storage medium - Google Patents
Database table fragmentation method and device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN115168499B CN115168499B CN202211076044.3A CN202211076044A CN115168499B CN 115168499 B CN115168499 B CN 115168499B CN 202211076044 A CN202211076044 A CN 202211076044A CN 115168499 B CN115168499 B CN 115168499B
- Authority
- CN
- China
- Prior art keywords
- fragment
- identifier
- row
- fragmentation
- combination
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR 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/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
- G06F16/278—Data partitioning, e.g. horizontal or vertical partitioning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR 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; CALCULATING OR 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/23—Updating
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Software Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The application relates to a fragmentation method and device of a database table, computer equipment and a storage medium. The method comprises the following steps: determining a fragmentation attribute value of each row in an original data table under each fragmentation attribute column of the original data table; calculating the fragment attribute values of the rows under the fragment attribute columns according to the fragment strategies corresponding to the fragment attributes represented by the fragment attribute columns to obtain a plurality of sub-fragment identifications corresponding to the rows; combining a plurality of sub-fragment identifications corresponding to the same row to obtain a fragment combination identification of each row; determining the fragment identifier corresponding to each row according to the fragment combination identifier of each row; and writing the data in each row in the original data table into the fragment table represented by the fragment identifier corresponding to each row. The method can improve the slicing performance.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for partitioning a database table, a computer device, and a storage medium.
Background
When the system is used to a certain stage, a large amount of data can be accumulated in the data table of the database, so that the number of rows in the data table can be very large, and the use of the data table is influenced. Therefore, in practical applications, the data table is often fragmented, that is, the data in the original data table is split in units of rows, and the original data table is split into a plurality of fragment tables. However, for splitting of an original data table, a uniform fragmentation strategy is generally adopted to split each row in the original data table, then data in each row is written into a fragmentation table corresponding to the row, a service scenario applicable to the uniform fragmentation strategy is single, and the performance of the obtained fragmentation table through splitting is insufficient in a use process.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a database table fragmentation method, apparatus, computer device, computer readable storage medium, and computer program product capable of improving fragmentation performance.
In a first aspect, the application provides a fragmentation method for a database table. The method comprises the following steps:
determining a fragmentation attribute value of each row in an original data table under each fragmentation attribute column of the original data table;
calculating the fragment attribute values of the rows under the fragment attribute columns according to the fragment strategies corresponding to the fragment attributes represented by the fragment attribute columns to obtain a plurality of sub-fragment identifications corresponding to the rows;
combining a plurality of sub-fragment identifications corresponding to the same row to obtain a fragment combination identification of each row;
determining the fragment identifier corresponding to each row according to the fragment combination identifier of each row;
and writing the data in each row in the original data table into the fragment table characterized by the fragment identifier corresponding to each row.
In a second aspect, the application further provides a fragmentation device for the database table. The device comprises:
the fragment attribute value determining module is used for determining the fragment attribute values of each row in the original data table under each fragment attribute column of the original data table aiming at each row in the original data table;
a sub-fragment identifier calculation module, configured to calculate, according to a fragment policy corresponding to a fragment attribute represented by each fragment attribute column, a fragment attribute value of the row in the fragment attribute column to obtain multiple sub-fragment identifiers corresponding to the row;
the combination module is used for combining a plurality of sub-fragment identifications corresponding to the same row to obtain a fragment combination identification of each row;
the fragment table determining module is used for determining the fragment identifier corresponding to each row according to the fragment combination identifier of each row;
and the writing module is used for writing the data in each row in the original data table into the fragment table represented by the fragment identifier corresponding to each row.
In one embodiment, the fragment table determining module is further configured to, for a fragment combination identifier of each row, search for a fragment identifier corresponding to the fragment combination identifier to obtain a fragment identifier corresponding to each row.
In one embodiment, the fragment table determining module is further configured to determine, if there is no fragment identifier corresponding to the fragment combination identifier, a newly added fragment identifier that is added correspondingly to the fragment combination identifier; establishing a newly added fragment table corresponding to the newly added fragment identifier; the writing module is further configured to write data in a row corresponding to the newly added segment identifier in the original data table into the newly added segment table.
In one embodiment, the fragmentation table determining module is further configured to, for a fragmentation combination identifier in each row, search a fragmentation identifier corresponding to the fragmentation combination identifier from a fragmentation identifier mapping table to obtain a fragmentation identifier corresponding to each row; the fragment identifier mapping table is used for recording the corresponding relation between the fragment combination identifier and the fragment identifier.
In one embodiment, the sharding device of the database table further includes: a query module, wherein:
the sub-fragment identifier calculating module is further used for calculating the input fragment attribute value according to the fragment strategy corresponding to the fragment attribute to which the input fragment attribute value belongs in the data query stage to obtain a target sub-fragment identifier;
the query module is used for searching a target fragment combination identifier containing the target fragment identifier; determining a target fragment identifier according to the target fragment combination identifier; and according to the input fragment attribute value, performing data query from the fragment table represented by the target fragment identifier.
In one embodiment, the query module is further configured to search a fragment identifier mapping table for a target fragment identifier corresponding to the target fragment combination identifier.
In one embodiment, the combination module is further configured to sequentially splice a plurality of sub-fragment identifiers corresponding to the same row in order to obtain a fragment combination identifier of each row; the sequence is the sequence of the fragment attribute values according to which the sub-fragment identifiers are obtained in the row.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the computer program causes the processor to execute the steps in the database table fragmentation method according to the embodiments of the present application.
In a fourth aspect, the present application further provides a computer-readable storage medium. The computer readable storage medium has a computer program stored thereon, and when executed by a processor, the computer program causes the processor to execute the steps in the method for sharding a database table according to the embodiments of the present application.
In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the processor is caused to execute the steps in the database table fragmentation method according to the embodiments of the present application.
The fragmentation method, the device, the computer equipment, the storage medium and the computer program product of the database table determine, for each row in an original data table, a fragmentation attribute value of the row under each fragmentation attribute column in the original data table, then calculate, according to a fragmentation strategy corresponding to the fragmentation attribute represented by each fragmentation attribute column, the fragmentation attribute value of the row under the fragmentation attribute column to obtain a plurality of fragmentation identifications corresponding to the row, then combine the plurality of fragmentation identifications corresponding to the same row to obtain a fragmentation combination identification of each row, determine a fragmentation identification corresponding to each row according to the fragmentation combination identification of each row, and finally write the data in each row in the original data table into the fragmentation table represented by the fragmentation identification corresponding to each row. The method comprises the steps of calculating the fragment attribute values under each fragment attribute column by the corresponding fragment strategies to obtain the sub-fragment identifications, combining the sub-fragment identifications to obtain the fragment combination identifications, and mapping the fragment identifications according to the fragment combination identifications, so that even if the attribute values under different fragment attribute columns in the original data table are calculated by different fragment strategies to perform fragmentation, the fragment table can be correspondingly determined to realize horizontal fragmentation, the problem of poor fragmentation performance caused by uniformly adopting the same fragment strategy is solved, the corresponding fragment strategies can be flexibly set for each fragment attribute column to perform fragmentation, and the fragmentation performance is improved.
Drawings
FIG. 1 is a diagram of an application environment for a sharding method of a database table in one embodiment;
FIG. 2 is a flow diagram of a method for sharding database tables in one embodiment;
FIG. 3 is a schematic diagram of an overall flow diagram of the slicing stage in one embodiment;
FIG. 4 is a schematic diagram illustrating the overall flow of the data query phase in one embodiment;
FIG. 5 is a block diagram of a sharding device for database tables in one embodiment;
FIG. 6 is a block diagram of a sharding device of a database table in another embodiment;
FIG. 7 is a diagram of the internal structure of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of and not restrictive on the broad application.
The fragmentation method of the database table provided by the embodiment of the application can be applied to the application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104, or may be located on the cloud or other network server. The user may set the fragmentation attribute and the fragmentation policy corresponding to each fragmentation attribute through the terminal 102, and the terminal 102 may send the set fragmentation attribute and fragmentation policy to the server 104. The server 104 may execute the fragmentation method of the database table in the embodiments of the present application according to the set fragmentation attribute and the fragmentation policy, so as to write the data in each row in the original data table into the fragmentation table represented by the fragmentation identifier corresponding to each row, thereby implementing horizontal table division. In a data query stage, a user can input an input fragment attribute value through the terminal 102, the terminal 102 can send the input fragment attribute value input by the user to the server 104, the server 104 can calculate the input fragment attribute value according to a fragment policy corresponding to a fragment attribute to which the input fragment attribute value belongs to obtain a target sub-fragment identifier, find a target fragment combination identifier containing the target sub-fragment identifier, then determine the target fragment identifier according to the target fragment combination identifier, and then perform data query from a fragment table represented by the target fragment identifier according to the input fragment attribute value. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices and portable wearable devices, and the internet of things devices may be smart speakers, smart televisions, smart air conditioners, smart car-mounted devices, and the like. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, and the like. The server 104 may be implemented as a stand-alone server or as a server cluster comprised of multiple servers.
In one embodiment, as shown in fig. 2, a fragmentation method for a database table is provided, which is described by taking the application of the method to the server 104 in fig. 1 as an example, and includes the following steps:
step 202, determining the fragment attribute values of the rows under each fragment attribute column in the original data table for each row in the original data table.
The slicing refers to splitting the original data table by taking a row as a unit, namely, horizontally dividing the original data table. The horizontal table division means that the original data table is divided by taking a row as a unit. The original data table is a data table which is not fragmented yet. Each column in the original data table corresponds to an attribute. The fragment attribute column refers to a column corresponding to a fragment attribute in the original data table. The fragment attribute value refers to data in the fragment attribute column in the original data table. The fragmentation attribute refers to an attribute according to which the original data table is fragmented. It can be understood that in the fragmentation stage, the data of each row needs to be divided into which fragmentation table according to the fragmentation attribute value of the row under the fragmentation attribute column.
In one embodiment, the shard attribute may be plural, and accordingly, the shard attribute column may be plural.
Specifically, the user may set the fragmentation attribute through the terminal, and the terminal may send the fragmentation attribute set by the user to the server. The server may determine a fragmentation attribute column in the original data table according to the fragmentation attribute set by the user, and determine, for each row in the original data table, a fragmentation attribute value of the row under each fragmentation attribute column in the original data table. It is understood that each row in the original data table corresponds to a slice attribute value under each slice attribute column.
For example: in a scenario that the raw data table is a business data table of an enterprise, assuming that the fragment attribute is two attributes of business date and department, the server may determine a specific business date recorded under the business date attribute column in each row in the raw data table (i.e., the fragment attribute value under the business date attribute column) and a specific department recorded under the department attribute column in each row in the raw data table (i.e., the fragment attribute value under the department attribute column), such as: the specific business date recorded in a certain row under the business date attribute column is 7/21/2022, and the specific department recorded under the department attribute column is a reward part.
And 204, calculating the fragment attribute values of the rows in the fragment attribute columns according to the fragment strategies corresponding to the fragment attributes represented by the fragment attribute columns to obtain a plurality of sub-fragment identifiers corresponding to the rows.
The fragmentation strategy refers to a calculation strategy adopted for calculating fragmentation attribute values under a fragmentation attribute column. And the calculation refers to the process of converting the fragment attribute value into the sub-fragment identifier according to the fragment strategy. The sub-fragment identifier refers to information obtained by calculating the fragment attribute value.
Specifically, the user may set the fragmentation attributes and the fragmentation policies corresponding to the fragmentation attributes respectively by the terminal. The terminal may send the fragmentation attribute and the fragmentation policy set by the user to the server. The server may calculate the fragment attribute values of the rows in the fragment attribute column according to the fragment policy corresponding to the fragment attribute represented by each fragment attribute column, to obtain a plurality of sub-fragment identifiers corresponding to the rows.
In one embodiment, the fragmentation policies corresponding to the respective fragmentation attributes may be different, or the fragmentation policies corresponding to some fragments are the same.
In one embodiment, the fragmentation policy may include at least one of a hash-based fragmentation policy, a time-based fragmentation policy, or a range-based fragmentation policy, among others.
For example: in a scenario that the original data table is a business data table of an enterprise, assuming that the fragmentation attributes are two attributes, namely, a business date and a department, different fragmentation policies can be correspondingly set according to respective characteristics of the two attributes, for example, the fragmentation policy corresponding to the fragmentation attribute of the business date is a time-based fragmentation policy, and the fragmentation policy corresponding to the fragmentation attribute of the department is a hash algorithm-based fragmentation policy.
More specifically, assuming that the time-based slicing policy corresponding to the service date is year-based slicing, the slicing policy corresponding to the department based on the hash algorithm is hash modulo operation, and the modulo operation is 6, for a certain row, it is assumed that the specific service date (i.e., the slicing attribute value under the service date attribute column) of the row under the service date attribute column is calculated to obtain 2022, and the specific department (i.e., the slicing attribute value under the department attribute column) of the row under the department attribute column is calculated to obtain 1, and then the sub-slicing identifiers corresponding to the row are 2022 and 1, respectively.
It may be understood that the fragmentation policies corresponding to the respective fragmentation attributes may be different, or the fragmentation policies corresponding to some fragments are the same, so that the fragmentation policies corresponding to the respective fragmentation attributes may be set for the respective fragmentation attributes, for example: a fragmentation strategy of a hash algorithm, a time-based fragmentation strategy or a range-based fragmentation strategy, etc. Because each slicing strategy has its own advantages and disadvantages, the usage scenario is relatively single, for example: the large probability of the fragmentation strategy based on the Hash algorithm can map a plurality of attribute values into the same fragmentation identification, so that the problem of data inclination is caused; the range-based fragmentation strategy needs to plan the range of fragment attribute values in advance, and if the fragment attribute values are not in the range planned in advance, fragment identifiers cannot be obtained through mapping, so that the use scene is single, and the performance is in problem; according to the time-based fragmentation strategy, if the data volume obtained by fragmentation under a certain time dimension is huge, performance optimization cannot be performed any more, so that the use scene of the traditional method that all fragmentation attribute columns uniformly adopt the same fragmentation strategy is single, and the method cannot be applied to complex service scenes. In this embodiment, each fragmentation attribute may be set with a different fragmentation policy, so that appropriate fragmentation policies may be set for different fragmentation attributes according to actual service conditions, and the method and the device may be applicable to complex service scenarios and improve fragmentation performance.
And step 206, combining the plurality of sub-fragment identifications corresponding to the same row to obtain a fragment combination identification of each row.
The fragment combination identifier is information obtained by combining a plurality of sub-fragment identifiers corresponding to the same row.
In an embodiment, the server may splice multiple sub-segment identifiers corresponding to the same row to obtain a segment combination identifier of each row.
In one embodiment, assuming that a key is a sub-segment identifier, a corresponding segment combination identifier of a certain row is fkey = key1# key2# \8230: # key, where fkey is the segment combination identifier, key is the nth sub-segment identifier of the row, and n is the number of sub-segment identifiers (i.e., the number of segment attributes).
For example: for a certain row, assuming that the sub-slice identifications of the row are key1=2022 and key2=1, respectively, the slice combination of the row is identified as fkey =2022#1.
And step 208, determining the fragment identifier corresponding to each row according to the fragment combination identifier of each row.
The fragment identifier is an identifier used for characterizing the fragment table. And the fragmentation table is a data table into which data in the original data table is written in the fragmentation process.
In an embodiment, the server may determine, according to the fragment combination identifier of each row, the fragment identifier corresponding to the record of the fragment combination identifier, to obtain the fragment identifier corresponding to each row.
In another embodiment, the server may perform an operation on the fragment combination identifier of each row according to a preset rule to obtain the fragment identifier corresponding to each row.
Step 210, writing the data in each row in the original data table into the fragment table characterized by the fragment identifier corresponding to each row.
Specifically, the server may determine, according to the fragment identifier corresponding to each row, the fragment table corresponding to the row, and then write the data in the row in the original data table into the fragment table corresponding to the row.
For example: for a certain row, it is assumed that the fragment identifier corresponding to the row is determined to be 1 according to the fragment combination identifier 2022#1, and the fragment table corresponding to the row is the fragment table characterized by the fragment identifier 1. For another row, if the fragment identifier corresponding to the row is determined to be 2 according to the fragment combination identifier 2022#2, the fragment table corresponding to the row is the fragment table represented by the fragment identifier 2.
The fragmentation method, the device, the computer equipment, the storage medium and the computer program product of the database table determine, for each row in an original data table, a fragmentation attribute value of the row under each fragmentation attribute column in the original data table, then calculate, according to a fragmentation strategy corresponding to the fragmentation attribute represented by each fragmentation attribute column, the fragmentation attribute value of the row under the fragmentation attribute column to obtain a plurality of fragmentation identifications corresponding to the row, then combine the plurality of fragmentation identifications corresponding to the same row to obtain a fragmentation combination identification of each row, determine a fragmentation identification corresponding to each row according to the fragmentation combination identification of each row, and finally write the data in each row in the original data table into the fragmentation table represented by the fragmentation identification corresponding to each row. The fragmentation table can be correspondingly determined to realize horizontal fragmentation even if the attribute values under different fragmentation attribute columns in the original data table are subjected to fragmentation by adopting different fragmentation strategies, so that the problem of poor fragmentation performance caused by the fact that the obtained fragmentation table cannot adapt to complex service scenes due to the fact that the fragmentation attribute columns are uniformly fragmented by adopting the same fragmentation strategy, and the problems of poor fragmentation performance due to insufficient performance of data query, data storage efficiency and the like are solved. The invention can flexibly set the corresponding fragmentation strategies for each fragmentation attribute column to perform fragmentation, improves the performance of the fragmentation in the aspects of data query, data storage and the like in the use process, and can be suitable for complex service scenes.
In one embodiment, determining the segment identifier corresponding to each row according to the segment combination identifier of each row includes: and aiming at the fragment combination identification of each row, searching the fragment identification corresponding to the fragment combination identification to obtain the fragment identification corresponding to each row.
In one embodiment, during the fragmentation process, the server may record the correspondence between the fragmentation combination identifier and the fragmentation identifier. The server may search the fragment identifier recorded corresponding to the fragment combination identifier from the recorded information for the fragment combination identifier of each row to obtain the fragment identifier corresponding to each row, and then write the data in each row in the original data table into the fragment table characterized by the fragment identifier corresponding to each row.
For example: assuming that the recorded information is that the fragment combination identifier 2022#1 corresponds to the fragment identifier 1, 2022#2 corresponds to the fragment identifier 2, and assuming that the fragment combination identifier of a certain row is 2022#2, the server may determine that the fragment identifier of the row corresponds to 2, and may write the data of the row into the fragment table characterized by the fragment identifier 2.
In the above embodiment, the server may search the segment identifier corresponding to the segment combination identifier, so that the segment identifier can be determined according to the segment combination identifier, and the segment identifier corresponds to the segment table, so that the segment attribute values of each segment attribute column can be combined after being calculated by using different segment policies, and then the segment combination identifier is mapped to the corresponding segment identifier, thereby avoiding the problem of poor segment performance caused by uniformly using a uniform segment policy, so that the corresponding segment policy can be flexibly set for each segment attribute column, and the segment performance is improved.
In one embodiment, the method further comprises: if the fragment identifier corresponding to the fragment combination identifier does not exist, determining a newly added fragment identifier correspondingly added to the fragment combination identifier; establishing a newly added fragment table corresponding to the newly added fragment identifier; and writing the data in the row corresponding to the newly added fragment identifier in the original data table into the newly added fragment table.
And the newly added fragment identifier is the newly added fragment identifier. The newly added fragment table is the fragment table represented by the newly added fragment identifier.
In an embodiment, in the fragmentation stage, each time a fragmentation combination identifier is obtained, a fragmentation identifier corresponding to the fragmentation combination identifier is searched, and if the corresponding fragmentation identifier is found, the server may write data in a row corresponding to the fragmentation identifier in the original data table into the fragmentation table characterized by the fragmentation identifier. If the fragment identifier corresponding to the fragment combination identifier does not exist (i.e., the corresponding fragment identifier is not found), the server may determine a newly added fragment identifier correspondingly added to the fragment combination identifier, establish a newly added fragment table corresponding to the newly added fragment identifier, and then write the data in the row corresponding to the newly added fragment identifier in the original data table into the newly added fragment table.
For example: if the fragment combination identifier fkey =2022#, 1 does not exist, the server may determine a newly added fragment identifier correspondingly added to the 2022#, and if the determined newly added fragment identifier is assumed to be 6, the server may establish a newly added fragment table corresponding to the newly added fragment identifier 6, and write data in a row corresponding to the newly added fragment identifier in the original data table into the newly added fragment table corresponding to the newly added fragment identifier 6.
In an embodiment, if there is no fragment identifier corresponding to the fragment combination identifier, the server may determine a newly added fragment identifier that is added correspondingly to the fragment combination identifier, and correspondingly record the fragment combination identifier and the newly added fragment identifier.
For example: if the fragment combination identifier fkey =2022#1 does not exist, the server may determine a newly added fragment identifier correspondingly added to the 2022#1, and if the determined newly added fragment identifier is 6, the server may correspondingly record the 2022#1 and the 6.
In an embodiment, the server may determine the newly added segment identifier that is added this time according to the segment identifier that is added last time. In an embodiment, the server may perform incremental increase on the basis of the fragment identifier added last time to obtain a newly added fragment identifier added this time. In one embodiment, the increment for each increment is 1. For example: assuming that the fragment identifier added last time is 5, the newly added fragment identifier added this time is 6.
In the above embodiment, if there is no fragment identifier corresponding to the fragment combination identifier, the newly added fragment identifier added corresponding to the fragment combination identifier is determined, and a newly added fragment table corresponding to the newly added fragment identifier is established, so that the correspondence between the fragment combination identifier and the fragment identifier can be continuously generated and recorded in the fragmentation process, and even if the attribute values under different fragment attribute columns in the original data table are calculated by using different fragmentation strategies to perform fragmentation, the fragment table can be correspondingly determined according to the correspondence between the fragment combination identifier and the fragment identifier to realize horizontal fragmentation, thereby avoiding the problem of poor fragmentation performance caused by uniformly using the same fragmentation strategy, enabling to flexibly set corresponding fragmentation strategies for each fragment attribute column to perform fragmentation, and improving fragmentation performance.
In one embodiment, for the fragment combination identifier of each row, searching for the fragment identifier corresponding to the fragment combination identifier, and obtaining the fragment identifier corresponding to each row includes: aiming at the fragmentation combination identification of each row, searching the fragmentation identification corresponding to the fragmentation combination identification from a fragmentation identification mapping table to obtain the fragmentation identification corresponding to each row; and the fragment identifier mapping table is used for recording the corresponding relation between the fragment combination identifier and the fragment identifier.
In one embodiment, the server may record the correspondence between the fragment combination identifier and the fragment identifier in a fragment identifier mapping table.
In one embodiment, a correspondence between a part of the fragment combination identifier and the fragment identifier may be recorded in the fragment identifier mapping table in advance before the fragment. Then, in the fragmentation stage, when the fragmentation identifier corresponding to the fragmentation combination identifier does not exist in the fragmentation identifier mapping table each time, the server may determine a newly added fragmentation identifier that is added correspondingly to the fragmentation combination identifier, and record a corresponding relationship between the fragmentation combination identifier and the newly added fragmentation identifier in the fragmentation identifier mapping table. In another embodiment, the corresponding relationship between the fragment combination identifier and the fragment identifier may not be recorded in the fragment identifier mapping table in advance before the fragment is fragmented, but a newly added fragment identifier is generated each time the fragment combination identifier is generated in the fragmentation process and the fragment identifier corresponding to the fragment combination identifier does not exist in the fragment identifier mapping table, and the corresponding relationship between the fragment combination identifier and the newly added fragment identifier is recorded in the fragment identifier mapping table.
In an embodiment, in the fragmentation stage, each time a fragmentation identifier corresponding to a fragmentation combination identifier does not exist in the fragmentation identifier mapping table, the server may determine a newly added fragmentation identifier added corresponding to the fragmentation combination identifier, and record a correspondence between the fragmentation combination identifier and the newly added fragmentation identifier in the fragmentation identifier mapping table. And if the fragment identifier corresponding to the fragment combination identifier exists in the fragment identifier mapping table, writing the data of the corresponding row of the fragment identifier in the original data table into the fragment table represented by the fragment identifier. And circulating in this way, so that the corresponding relation between each fragment combination identifier and the corresponding fragment identifier is recorded in the fragment identifier mapping table.
In one embodiment, the server may record a correspondence between a fragment combination identifier and a corresponding fragment identifier in each row of the fragment identifier mapping table.
In the above embodiment, for the fragment combination identifier in each row, the fragment identifier corresponding to the fragment combination identifier is searched from the fragment identifier mapping table to obtain the fragment identifier corresponding to each row, and the correspondence between the fragment combination identifier and the fragment identifier can be recorded by the fragment identifier mapping table, so that even if the attribute values under different fragment attribute columns in the original data table are calculated by using different fragmentation strategies to perform fragmentation, the fragment table can be correspondingly determined according to the correspondence between the fragment combination identifier and the fragment identifier in the fragment identifier mapping table to implement horizontal fragmentation, thereby avoiding the problem of poor fragmentation performance caused by uniformly using the same fragmentation strategy, enabling to flexibly set the corresponding fragmentation strategy for each fragment attribute column to perform fragmentation, and improving fragmentation performance.
As shown in fig. 3, which is an overall flowchart of the fragmentation stage, after the writing process is started (i.e., the fragmentation is started), the server may first determine fragmentation attribute values of each row in the original data table under each fragmentation attribute column corresponding to each preset fragmentation attribute, for example, the fragmentation attribute column corresponding to the fragmentation attribute in fig. 2 is column 1 to column N. Then, the server may determine the fragmentation policy corresponding to each fragmentation attribute, for example, the fragmentation policy corresponding to the fragmentation attribute in column 1 in fig. 2 is a time-based fragmentation policy, and the fragmentation policy corresponding to the fragmentation attribute in column 2 is a hash algorithm-based fragmentation policy. Then, the server may calculate the fragmentation attribute values of each row according to the determined fragmentation policy to obtain a sub-fragmentation identifier, for example, the sub-fragmentation identifier obtained by calculating the fragmentation attribute values in column 1 is key1= format (column 1 value), that is, the fragmentation attribute values in column 1 are calculated according to the time-based fragmentation policy, for example, the sub-fragmentation identifier obtained by calculating the fragmentation attribute values in column 2 is key2= hash (column 2 value) mod K, that is, the fragmentation attribute values in column 2 are calculated according to the hash algorithm-based fragmentation policy, where mod K represents modulo, and modulo is K. Then, the server may combine the sub-fragment representations corresponding to the same row to obtain a fragment combination identifier fkey = key1# key #. Then, the server may search the fragment identifier findex corresponding to the fragment combination identifier fkey from the fragment identifier mapping table to obtain the fragment identifier corresponding to each row, and finally, the server may write the data of each row in the original data table into the fragment table represented by the fragment identifier corresponding to the row, respectively.
In one embodiment, the method further comprises: in a data query stage, calculating an input fragment attribute value according to a fragment strategy corresponding to a fragment attribute to which the input fragment attribute value belongs to obtain a target sub-fragment identifier; searching a target fragment combination identifier containing a target fragment identifier; determining a target fragment identifier according to the target fragment combination identifier; and according to the input fragment attribute value, performing data query from the fragment table represented by the target fragment identifier.
The input fragment attribute value is an attribute value which is input by a user and belongs to the fragment attribute, and data corresponding to the fragment attribute value needs to be queried from the fragment table. The target sub-fragment identifier is information obtained by calculating the input fragment attribute value. The target fragment combination identifier is a fragment combination identifier containing a target sub-fragment identifier in each fragment combination identifier generated in the fragmentation stage. And the target fragment identifier is a fragment identifier determined according to the target fragment combination identifier.
Specifically, in the data query phase, the user may input a fragment attribute value through the terminal, and the terminal may transmit the input fragment attribute value to the server. The server may calculate the input fragment attribute value according to a fragment policy corresponding to a fragment attribute to which the input fragment attribute value belongs to obtain a target sub-fragment identifier, then search for a target fragment combination identifier including the target sub-fragment identifier, then determine the target fragment identifier according to the target fragment combination identifier, finally determine a fragment table represented by the target fragment identifier, search for a position of the input fragment attribute value from the fragment table represented by the target fragment identifier according to the input fragment attribute value, and determine data corresponding to the input fragment attribute value in the fragment table.
For example: the input fragment attribute value is 21/7/2022, the server may determine that the fragment attribute to which the input fragment attribute value belongs is the fragment attribute of service time, and because the fragment policy adopted for the fragment attribute of service time in the fragment phase is a time-based fragment policy, the server may calculate the input fragment attribute value 2022/7/21 by using the time-based fragment policy in the data query phase, and assuming that the calculated sub-fragment identifier is 2022, the server may search for a fragment combination identifier including 2022 as a target fragment combination identifier, for example, find two target fragment combination identifiers, i.e., 2022#1 and 2022#2, and may use the fragment identifier 1 corresponding to 2022#1 and the fragment identifier 2 corresponding to 2022#2 as target fragment identifiers, and perform data query from the fragment tables characterized by the fragment identifiers 1 and 2, respectively.
In one embodiment, the input tile attribute values may be one or more.
In an embodiment, if the input fragment attribute value is one, the target fragment combination identifier including the target fragment identifier may be directly searched after the input fragment attribute value is calculated to obtain the target fragment identifier. In another embodiment, if there are multiple input fragment attribute values, the server may calculate each input fragment attribute value according to its corresponding fragment policy to obtain multiple target sub-fragment identifiers, then combine the multiple target sub-fragment identifiers to obtain a combined result, and then find a target fragment combined identifier that includes the combined result.
In one embodiment, the server may determine, according to the target fragment combination identifier, a target fragment identifier corresponding to the target fragment combination identifier record. In another embodiment, the server may perform an operation on the target fragment combination identifier according to a preset rule to obtain the target fragment identifier.
In the above embodiment, in the data query stage, the input fragment attribute value is first calculated according to the fragment policy corresponding to the fragment attribute to which the input fragment attribute value belongs, so as to obtain the target sub-fragment identifier, then the target fragment combination identifier including the target sub-fragment identifier is searched, the target fragment identifier is determined according to the target fragment combination identifier, and then data query is performed from the fragment table represented by the target fragment identifier according to the input fragment attribute value. Under the condition that different fragmentation strategies are adopted for fragmentation of each fragmentation attribute column, data query can be accurately and efficiently carried out in a data query stage.
Fig. 4 is a schematic overall flow chart of the data query phase. In the data query phase, the server may first determine a fragment attribute to which an input fragment attribute value belongs, then determine a fragment policy corresponding to the fragment attribute to which the input fragment attribute value belongs, then calculate each input fragment attribute value according to the fragment policy to obtain a sub-fragment identifier, then combine each sub-fragment identifier to obtain a combined result, find a fragment combination identifier containing the combined result from a fragment identifier mapping table as a target fragment combination identifier, determine a target fragment identifier corresponding to the target fragment combination identifier from the fragment identifier mapping table, and finally perform data query from a fragment table represented by the target fragment identifier.
In one embodiment, determining the target segment identifier according to the target segment combination identifier includes: and searching a target fragment identifier corresponding to the target fragment combination identifier from the fragment identifier mapping table.
Specifically, in the fragmentation phase, the server may record a correspondence between a fragmentation combination identifier and a fragmentation identifier in a fragmentation identifier mapping table. In the data query phase, the server may search a target fragment identifier corresponding to the target fragment combination identifier from a fragment identifier mapping table established in advance in the fragmentation phase.
In the above embodiment, the target fragment identifier corresponding to the target fragment combination identifier is searched from the fragment identifier mapping table, and the fragment table can be accurately and efficiently determined in the data query stage, so that accurate and efficient data query is realized.
In one embodiment, combining a plurality of sub-segment identifiers corresponding to the same row to obtain a segment combination identifier of each row includes: sequentially splicing a plurality of sub-fragment identifications corresponding to the same row according to the sequence to obtain a fragment combination identification of each row; and the sequence is the sequence of the fragment attribute values according to which the sub-fragment identifiers are obtained in the row.
Specifically, for each row in the original data table, the server may sequentially splice a plurality of sub-fragment identifiers corresponding to the same row according to the sequence of the fragment attribute values according to which the sub-fragment identifiers are obtained in the same row, so as to obtain a fragment combination identifier of the row.
In the above embodiment, the plurality of sub-segment identifiers corresponding to the same row are sequentially spliced to obtain the segment combination identifier of each row, so that the segment identifiers can be obtained according to the segment combination identifiers, and even if the attribute values under different segment attribute columns in the original data table are subjected to calculation by using different segment strategies to perform segmentation, the segment table can be correspondingly determined to realize horizontal segment table.
It should be understood that, although the steps in the flowcharts related to the embodiments are shown in sequence as indicated by the arrows, the steps are not necessarily executed in sequence as indicated by the arrows. The steps are not limited to being performed in the exact order illustrated and, unless explicitly stated herein, may be performed in other orders. Moreover, at least a part of the steps in the flowcharts related to the above embodiments may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the steps or stages is not necessarily sequential, but may be performed alternately or alternately with other steps or at least a part of the steps or stages in other steps.
Based on the same inventive concept, the embodiment of the application also provides a database table fragmentation device for realizing the above fragmentation method of the database table. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the method, so that specific limitations in the following embodiments of the fragmentation device for one or more database tables can be referred to the limitations of the fragmentation method for the database tables, and details are not described herein again.
In one embodiment, as shown in fig. 5, there is provided a sharding apparatus 500 of a database table, including: a fragment attribute value determination module 502, a sub-fragment identifier calculation module 504, a combination module 506, a fragment table determination module 508, and a write-in module 510, wherein:
a fragment attribute value determining module 502, configured to determine, for each row in the original data table, a fragment attribute value of the row under each fragment attribute column in the original data table.
And a sub-fragment identifier calculating module 504, configured to calculate, according to the fragment policy corresponding to the fragment attribute represented by each fragment attribute column, the fragment attribute value of the row in the fragment attribute column to obtain multiple sub-fragment identifiers corresponding to the row.
The combining module 506 is configured to combine multiple sub-segment identifiers corresponding to the same row to obtain a segment combined identifier of each row.
The fragmentation table determining module 508 is configured to determine a fragmentation identifier corresponding to each row according to the fragmentation combination identifier of each row.
A writing module 510, configured to write the data in each row in the original data table into the fragment table characterized by the fragment identifier corresponding to each row.
In an embodiment, the fragmentation table determining module 508 is further configured to, for a fragmentation combination identifier of each row, search for a fragmentation identifier corresponding to the fragmentation combination identifier to obtain a fragmentation identifier corresponding to each row.
In an embodiment, the fragment table determining module 508 is further configured to determine, if there is no fragment identifier corresponding to the fragment combination identifier, a newly added fragment identifier correspondingly added to the fragment combination identifier; establishing a newly added fragment table corresponding to the newly added fragment identifier; the writing module 510 is further configured to write the data in the row corresponding to the newly added segment identifier in the original data table into the newly added segment table.
In an embodiment, the fragmentation table determining module 508 is further configured to, for the fragmentation combination identifier in each row, search the fragmentation identifier corresponding to the fragmentation combination identifier from the fragmentation identifier mapping table to obtain the fragmentation identifier corresponding to each row; and the fragment identifier mapping table is used for recording the corresponding relation between the fragment combination identifier and the fragment identifier.
In one embodiment, as shown in fig. 6, the sharding device 500 of the database table further includes: a query module 512, wherein:
the sub-fragment identifier calculating module 506 is further configured to calculate the input fragment attribute value according to the fragment policy corresponding to the fragment attribute to which the input fragment attribute value belongs in the data query phase, so as to obtain a target sub-fragment identifier;
a query module 512, configured to search for a target fragment combination identifier that includes a target sub-fragment identifier; determining a target fragment identifier according to the target fragment combination identifier; and according to the input fragment attribute value, performing data query from the fragment table represented by the target fragment identifier.
In one embodiment, the query module 512 is further configured to find a target segment identifier corresponding to the target segment combination identifier from the segment identifier mapping table.
In an embodiment, the combining module 506 is further configured to sequentially splice a plurality of sub-segment identifiers corresponding to the same row in order to obtain a segment combined identifier of each row; and the sequence is the sequence of the fragment attribute values according to which the sub-fragment identifiers are obtained in the row.
The fragmentation device of the database table determines, for each row in an original data table, a fragmentation attribute value of the row under each fragmentation attribute column in the original data table, then calculates, according to a fragmentation policy corresponding to a fragmentation attribute represented by each fragmentation attribute column, the fragmentation attribute value of the row under the fragmentation attribute column to obtain a plurality of sub-fragmentation identifiers corresponding to the row, combines a plurality of sub-fragmentation identifiers corresponding to the same row to obtain a fragmentation combination identifier of each row, determines, according to the fragmentation combination identifier of each row, a fragmentation identifier corresponding to each row, and finally writes data in each row in the original data table into a fragmentation table represented by the fragmentation identifier corresponding to each row. The fragmentation table can be correspondingly determined to realize horizontal fragmentation even if the attribute values under different fragmentation attribute columns in the original data table are subjected to fragmentation by adopting different fragmentation strategies, so that the problem that the fragmentation table obtained by uniformly adopting the same fragmentation strategy to perform fragmentation cannot adapt to complex service scenes, the efficiency of data query and data storage is insufficient, and the fragmentation performance is poor is solved, so that the corresponding fragmentation strategies can be flexibly set for each fragmentation attribute column to perform fragmentation, and the fragmentation performance is improved.
The modules in the fragmentation device of the database table can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program when executed by a processor implements a method of sharding database tables.
Those skilled in the art will appreciate that the architecture shown in fig. 7 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the above-described method embodiments when executing the computer program.
In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
In an embodiment, a computer program product is provided, comprising a computer program which, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high-density embedded nonvolatile Memory, resistive Random Access Memory (ReRAM), magnetic Random Access Memory (MRAM), ferroelectric Random Access Memory (FRAM), phase Change Memory (PCM), graphene Memory, and the like. Volatile Memory can include Random Access Memory (RAM), external cache Memory, and the like. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others. The databases referred to in various embodiments provided herein may include at least one of relational and non-relational databases. The non-relational database may include, but is not limited to, a block chain based distributed database, and the like. The processors referred to in the various embodiments provided herein may be, without limitation, general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, or the like.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, and these are all within the scope of protection of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims (12)
1. A method of sharding a database table, the method comprising:
determining a fragmentation attribute value of each row in an original data table under each fragmentation attribute column of the original data table;
calculating the fragment attribute values of the rows under the fragment attribute columns according to the fragment strategies corresponding to the fragment attributes represented by the fragment attribute columns to obtain a plurality of sub-fragment identifications corresponding to the rows;
combining a plurality of sub-fragment identifications corresponding to the same row to obtain a fragment combination identification of each row;
aiming at the fragment combination identification of each row, searching the fragment identification corresponding to the fragment combination identification to obtain the fragment identification corresponding to each row; if the fragment identifier corresponding to the fragment combination identifier does not exist, determining a newly added fragment identifier correspondingly added to the fragment combination identifier, and establishing a newly added fragment table corresponding to the newly added fragment identifier;
and writing the data in each row in the original data table into the fragment table represented by the fragment identifier corresponding to each row.
2. The method according to claim 1, wherein the searching for the segment identifier corresponding to the segment combination identifier for the segment combination identifier of each row to obtain the segment identifier corresponding to each row comprises:
aiming at the fragmentation combination identification of each row, searching the fragmentation identification corresponding to the fragmentation combination identification from a fragmentation identification mapping table to obtain the fragmentation identification corresponding to each row; the fragment identifier mapping table is used for recording the corresponding relation between the fragment combination identifier and the fragment identifier.
3. The method of claim 1, further comprising:
in a data query stage, calculating an input fragment attribute value according to a fragment strategy corresponding to a fragment attribute to which the input fragment attribute value belongs to obtain a target sub-fragment identifier;
searching a target fragment combination identifier containing the target sub-fragment identifier;
determining a target fragment identifier according to the target fragment combination identifier;
and according to the input fragment attribute value, performing data query from the fragment table represented by the target fragment identifier.
4. The method according to claim 3, wherein determining a target segment identity according to the target segment combination identity comprises:
and searching a target fragment identifier corresponding to the target fragment combination identifier from a fragment identifier mapping table.
5. The method according to any one of claims 1 to 4, wherein the combining the plurality of sub-slice identifiers corresponding to the same row to obtain a slice combination identifier of each row comprises:
sequentially splicing a plurality of sub-fragment identifications corresponding to the same row according to the sequence to obtain a fragment combination identification of each row; and the sequence is the sequence of the fragment attribute values according to which the sub-fragment identifiers are obtained in the row.
6. An apparatus for sharding database tables, the apparatus comprising:
the fragment attribute value determining module is used for determining the fragment attribute values of each row in the original data table under each fragment attribute column of the original data table aiming at each row in the original data table;
a sub-fragment identifier calculation module, configured to calculate, according to a fragment policy corresponding to a fragment attribute represented by each fragment attribute column, a fragment attribute value of the row in the fragment attribute column to obtain multiple sub-fragment identifiers corresponding to the row;
the combination module is used for combining a plurality of sub-fragment identifications corresponding to the same row to obtain a fragment combination identification of each row;
the fragment table determining module is used for searching fragment identifications corresponding to the fragment combination identifications aiming at the fragment combination identifications of each row to obtain the fragment identifications corresponding to each row; if the fragment identifier corresponding to the fragment combination identifier does not exist, determining a newly added fragment identifier correspondingly added to the fragment combination identifier, and establishing a newly added fragment table corresponding to the newly added fragment identifier;
and the writing module is used for writing the data in each row in the original data table into the fragment table represented by the fragment identifier corresponding to each row.
7. The apparatus according to claim 6, wherein the fragmentation table determining module is further configured to, for a fragmentation combination identifier in each row, search a fragmentation identifier corresponding to the fragmentation combination identifier from a fragmentation identifier mapping table to obtain a fragmentation identifier corresponding to each row; the fragment identifier mapping table is used for recording the corresponding relation between the fragment combination identifier and the fragment identifier.
8. The apparatus of claim 6, wherein the sharding means of the database table further comprises: a query module, wherein:
the sub-fragment identification calculation module is also used for calculating the input fragment attribute value according to the fragment strategy corresponding to the fragment attribute to which the input fragment attribute value belongs in a data query stage to obtain a target sub-fragment identification;
the query module is used for searching a target fragment combination identifier containing the target fragment identifier; determining a target fragment identifier according to the target fragment combination identifier; and according to the input fragment attribute value, performing data query from the fragment table represented by the target fragment identifier.
9. The apparatus of claim 8, wherein the query module is further configured to find a target segment identifier corresponding to the target segment combination identifier from a segment identifier mapping table.
10. The apparatus according to any one of claims 6 to 9, wherein the combination module is further configured to sequentially splice a plurality of sub-segment identifiers corresponding to a same row in order to obtain a segment combination identifier of each row; and the sequence is the sequence of the fragment attribute values according to which the sub-fragment identifiers are obtained in the row.
11. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 5.
12. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 5.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211076044.3A CN115168499B (en) | 2022-09-05 | 2022-09-05 | Database table fragmentation method and device, computer equipment and storage medium |
PCT/CN2022/133114 WO2024050972A1 (en) | 2022-09-05 | 2022-11-21 | Database table sharding method and apparatus, computer device, and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211076044.3A CN115168499B (en) | 2022-09-05 | 2022-09-05 | Database table fragmentation method and device, computer equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115168499A CN115168499A (en) | 2022-10-11 |
CN115168499B true CN115168499B (en) | 2023-01-03 |
Family
ID=83481308
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211076044.3A Active CN115168499B (en) | 2022-09-05 | 2022-09-05 | Database table fragmentation method and device, computer equipment and storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN115168499B (en) |
WO (1) | WO2024050972A1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115168499B (en) * | 2022-09-05 | 2023-01-03 | 金蝶软件(中国)有限公司 | Database table fragmentation method and device, computer equipment and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112347098A (en) * | 2020-09-27 | 2021-02-09 | 武汉虹信科技发展有限责任公司 | Database table splitting method and system, electronic equipment and storage medium |
CN112765169A (en) * | 2021-01-11 | 2021-05-07 | 北京众享比特科技有限公司 | Data processing method, device, equipment and storage medium |
CN114168588A (en) * | 2021-10-10 | 2022-03-11 | 李明昊 | Vector database storage and retrieval method |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104881466B (en) * | 2015-05-25 | 2018-09-07 | 百度在线网络技术(北京)有限公司 | The processing of data fragmentation and the delet method of garbage files and device |
US10747814B2 (en) * | 2017-09-29 | 2020-08-18 | Oracle International Corporation | Handling semi-structured and unstructured data in a sharded database environment |
CN110019211A (en) * | 2017-11-27 | 2019-07-16 | 北京京东尚科信息技术有限公司 | The methods, devices and systems of association index |
US11327675B2 (en) * | 2019-01-23 | 2022-05-10 | Accenture Global Solutions Limited | Data migration |
US11150960B2 (en) * | 2019-03-28 | 2021-10-19 | Amazon Technologies, Inc. | Distributed application allocation and communication |
US20210173888A1 (en) * | 2019-12-08 | 2021-06-10 | Akamai Technologies Inc. | Proxy server caching of database content |
CN114116699A (en) * | 2020-09-01 | 2022-03-01 | 深圳市珍爱捷云信息技术有限公司 | Data processing method and device, electronic equipment and computer readable storage medium |
CN113468148B (en) * | 2021-08-13 | 2023-02-17 | 上海浦东发展银行股份有限公司 | Data migration method and device of database, electronic equipment and storage medium thereof |
CN115168499B (en) * | 2022-09-05 | 2023-01-03 | 金蝶软件(中国)有限公司 | Database table fragmentation method and device, computer equipment and storage medium |
-
2022
- 2022-09-05 CN CN202211076044.3A patent/CN115168499B/en active Active
- 2022-11-21 WO PCT/CN2022/133114 patent/WO2024050972A1/en unknown
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112347098A (en) * | 2020-09-27 | 2021-02-09 | 武汉虹信科技发展有限责任公司 | Database table splitting method and system, electronic equipment and storage medium |
CN112765169A (en) * | 2021-01-11 | 2021-05-07 | 北京众享比特科技有限公司 | Data processing method, device, equipment and storage medium |
CN114168588A (en) * | 2021-10-10 | 2022-03-11 | 李明昊 | Vector database storage and retrieval method |
Non-Patent Citations (1)
Title |
---|
"森林生态站大数据快速存储与索引方法";王新阳;《农业机械学报》;20210831;第52卷(第8期);第195-204页 * |
Also Published As
Publication number | Publication date |
---|---|
WO2024050972A1 (en) | 2024-03-14 |
CN115168499A (en) | 2022-10-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111177302B (en) | Service bill processing method, device, computer equipment and storage medium | |
CN112287182B (en) | Graph data storage and processing method and device and computer storage medium | |
US9684702B2 (en) | Database redistribution utilizing virtual partitions | |
CN102725755B (en) | Method and system of file access | |
US20140164391A1 (en) | Data block saving system and method | |
CN107704202B (en) | Method and device for quickly reading and writing data | |
CN106471501B (en) | Data query method, data object storage method and data system | |
CN114579584B (en) | Data table processing method and device, computer equipment and storage medium | |
CN114138907A (en) | Data processing method, computer device, storage medium, and computer program product | |
CN115168499B (en) | Database table fragmentation method and device, computer equipment and storage medium | |
CN114089921A (en) | Power system data storage method and device, computer equipment and storage medium | |
CN117743299A (en) | Database migration method, device, equipment, medium and product | |
CN116991800A (en) | File acquisition system, method, device, computer equipment and storage medium | |
CN114661249B (en) | Data storage method and device, computer equipment and storage medium | |
WO2019214071A1 (en) | Communication method for users on blockchain, device, terminal device, and storage medium | |
CN115858471A (en) | Service data change recording method, device, computer equipment and medium | |
CN115168409B (en) | Data query method and device for database sub-tables and computer equipment | |
CN114048219A (en) | Graph database updating method and device | |
CN112860755B (en) | Service identifier generation method, device, computer equipment and medium | |
CN117540056B (en) | Method, device, computer equipment and storage medium for data query | |
CN117076476A (en) | Object information processing method, device, computer equipment and storage medium | |
CN115794807A (en) | Data updating method, device, equipment, storage medium and computer program product | |
CN114254045A (en) | Data storage method, device and equipment based on block chain and storage medium | |
CN114647630A (en) | File synchronization method, information generation method, file synchronization device, information generation device, computer equipment and storage medium | |
CN116910115A (en) | Group query method, device, computer equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |