CN104765794B - A kind of method for partitioning database and device - Google Patents
A kind of method for partitioning database and device Download PDFInfo
- Publication number
- CN104765794B CN104765794B CN201510134427.5A CN201510134427A CN104765794B CN 104765794 B CN104765794 B CN 104765794B CN 201510134427 A CN201510134427 A CN 201510134427A CN 104765794 B CN104765794 B CN 104765794B
- Authority
- CN
- China
- Prior art keywords
- subregion
- data
- time point
- target data
- database
- 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
Abstract
The embodiment of the invention discloses a kind of method for partitioning database and device, method therein may include:The second subregion for the first subregion in database is created in the database;The target data in the first subregion is copied to the second subregion in first time point, wherein target data include the first time point stored in the first subregion before static object data and first time point to the dynamic object data between the second time point, the second time point was the time point when static object data in the first subregion to be all copied to the second subregion;It is recorded from first time point to the data variation for corresponding to target data the second time point in the journal file that the second time point began look for the first subregion;It is recorded according to the data variation of target data, target data is changed in the second subregion.Using the present invention, in the case where not stopping database service, the online subregion dilatation of database is realized.
Description
Technical field
The present invention relates to Internet technical field more particularly to a kind of method for partitioning database and device.
Background technology
With the development of Internet technology, the type of service in internet is more and more, and the quantity of Internet user is also got over
Come bigger.Business in internet is usually required to be equipped with corresponding data-base cluster, stores required business datum, ensures industry
The normal operation of business.
According to the difference of business, the scale of provisioned data-base cluster is also different.It is general using such as in this respect at present
Under type processing:Determine that the scale of built data-base cluster at the beginning, such as planned by 100,000,000 grades of users, setting compared with
A database node is only arranged alternatively, being planned by small user volume in the database node of multi-quantity.Then, by selected
The data of different user are assigned in different databases by distribution mechanism, and are arranged according to the data-base cluster built and are accessed
The access rule of each database node.
At least there is following defect in the implementation method of above-mentioned existing data-base cluster:
For an emerging business, often the user volume of business and user behavior are difficult to assess, with business
Development, the quantity of business datum can be more and more huger, when the capacity to data library such as being needed to expand, needs to suspend database
Service, after the capacity to database is extended, could restore the use to database, carried out so as to cause database
Normal use is unable to during dilatation.
Invention content
Technical problem to be solved of the embodiment of the present invention is, provides a kind of method for partitioning database and device, realizes
Under the premise of not stopping database service, online subregion dilatation is carried out to database, and when carrying out subregion, it can be preferable
Guarantee data consistency and integrality.
In a first aspect, an embodiment of the present invention provides a kind of method for partitioning database, including:
The second subregion for the first subregion in the database is created in the database;
The target data in first subregion is copied to second subregion in first time point, wherein the target
Data include the first time point stored in first subregion before static object data and the first time point arrive
Dynamic object data between second time point, second time point are that the static object data in first subregion are complete
Portion is copied to time point when second subregion;
From the first time point to institute in the journal file that second time point begins look for first subregion
State the data variation record that the target data is corresponded between the second time point;
It is recorded according to the data variation of the target data, the target data is changed in second subregion.
With reference to first aspect, in the first possible implementation, it is described in first time point by first subregion
In target data be copied to second subregion and specifically include:
If having been increased newly in first subregion between the first time point and second time point in described the
The dynamic object data of the area segments of two subregions, the then static mesh before the first time point that will be stored in first subregion
While mark data are copied to second subregion, by the dynamic object data of the newly-increased area segments in second subregion
It is copied to second subregion.
With reference to first aspect, described to begin look for institute at second time point in second of possible realization method
It states in the journal file of the first subregion from the first time point to the data for corresponding to the target data current point in time
After variation record, is recorded according to the data variation of the target data, the target data is changed in second subregion
Before, further include:
Judge that the target data is that data variation has occurred before being replicated or after being replicated;
If data variation has occurred in the target data before being replicated, to the target in second subregion
Data are without modification;
If data variation has occurred after be replicated in the target data, execute described according to the target data
Data variation records, the step of changing the target data in second subregion.
With reference to first aspect, described to change the mesh in second subregion in the third possible realization method
After marking data, further include:
The second time point described in the journal file of first subregion is begun look for third at second time point
Data variation record between time point;
According to the data variation record by first subregion from second time point to the third time point
Between the dynamic object data of the increased area segments in second subregion be copied to second subregion, and described
Target data is changed in second subregion, wherein the third time point is that first subregion is in second subregion
The data of same area section whole consistent time point.
With reference to first aspect, in the 4th kind of possible realization method, described recorded according to the data variation will be described
From second time point to the increased area segments in second subregion between point the third in first subregion
Dynamic object data be copied to second subregion, and after changing target data in second subregion, further include:
Change the zone name of first subregion;
After changing the zone name of first subregion, the target data stored in first subregion is deleted
And the corresponding area segments of the target data;
It is deleted in the corresponding area segments of the target data and the target data that will be stored in first subregion
Later, the zone name of second subregion is set, so that second subregion comes into force in the database.
Second aspect, an embodiment of the present invention provides a kind of partitions of database devices, including:
Creating unit, for creating the second subregion for the first subregion in the database in the database;
First copied cells, for the target data in first subregion to be copied to described second in first time point
Subregion, wherein the target data include the first time point stored in first subregion before static object data and
For the first time point to the dynamic object data between the second time point, second time point is will be in first subregion
Time point of static object data when being all copied to second subregion;
First searching unit, in the journal file that second time point begins look for first subregion from institute
First time point is stated to record to the data variation for corresponding to the target data between second time point;
First modification unit is changed for being recorded according to the data variation of the target data in second subregion
The target data.
In conjunction with second aspect, in the first possible implementation, if first copied cells are specifically used in institute
It states and has increased the area segments in second subregion between first time point and second time point in first subregion newly
Dynamic object data, then the static object data before the first time point stored in first subregion are being copied to institute
While stating the second subregion, the dynamic object data of the newly-increased area segments in second subregion are copied to described second
Subregion.
Further include in second of possible realization method in conjunction with second aspect:
Judging unit, for judging that the target data is that data have occurred before being replicated or after being replicated to become
Change;
If data variation has occurred specifically for the target data in the first modification unit before being replicated,
To the target data without modification in second subregion;Become if data have occurred in the target data after being replicated
Change, then it is described to be recorded according to the data variation of the target data, change the target data in second subregion.
Further include in the third possible realization method in conjunction with second aspect:
Second searching unit, for being begun look at second time point described in the journal file of first subregion
Second time point recorded to the data variation between third time point;
Second copied cells, for according to the data variation record by first subregion from second time point
Dynamic object data to the increased area segments in second subregion between the third time point are copied to described
Two subregions, and change target data in second subregion, wherein the third time point is first subregion and institute
State in the second subregion the whole consistent time point of the data in same area section.
Further include in the 4th kind of possible realization method in conjunction with second aspect:
Second modification unit, the zone name for changing first subregion;
Deleting unit, for after changing the zone name of first subregion, deleting and being stored in first subregion
The target data and the corresponding area segments of the target data;
Setting unit, in the target data that will be stored in first subregion and target data correspondence
Area segments delete after, the zone name of second subregion is set, so that second subregion carries out in the database
It comes into force.
It can be in the feelings for not stopping database service when data-base cluster off-capacity by implementing the embodiment of the present invention
Under condition, online subregion is carried out to database, to be extended to the capacity of database, and according to the operation log of database text
Part repairs migrating data, to ensure the consistency and integrality of migrating data.
Description of the drawings
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with
Obtain other attached drawings according to these attached drawings.
Fig. 1 is the system architecture diagram of data base management system provided in an embodiment of the present invention;
Fig. 2 is the flow diagram of the first embodiment of method for partitioning database provided in an embodiment of the present invention;
Fig. 2 a are the schematic diagrames of the time shaft of method for partitioning database provided in an embodiment of the present invention;
Fig. 3 is the flow diagram of the second embodiment of method for partitioning database provided in an embodiment of the present invention;
Fig. 4 is the structural schematic diagram of the first embodiment of partitions of database device provided in an embodiment of the present invention;
Fig. 5 is the structural schematic diagram of the second embodiment of partitions of database device provided in an embodiment of the present invention.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, those of ordinary skill in the art are obtained every other without creative efforts
Embodiment shall fall within the protection scope of the present invention.
It should be noted that the term used in embodiments of the present invention is the mesh only merely for description specific embodiment
, it is not intended to limit the invention." the one of the embodiment of the present invention and singulative used in the attached claims
Kind ", " described " and "the" are also intended to including most forms, unless context clearly shows that other meanings.It is also understood that this
Term "and/or" used herein refers to and includes one or more associated any or all possible group of list items purposes
It closes.
An embodiment of the present invention provides a kind of method for partitioning database and devices, realize before not stopping database service
It puts, online subregion dilatation is carried out to database, and when carrying out subregion, can preferably ensure the consistency of data and complete
Whole property.Embodiment to facilitate the understanding of the present invention is below first described the method for partitioning database of the embodiment of the present invention.
It is the system architecture diagram of data base management system provided in an embodiment of the present invention, in Fig. 1, gateway connects referring to Fig. 1
It receives the application request of user, and the partition table of rear end is abstracted as table (and Relational DBMS MySQL
Zoning concept is the same, is all transparent for data consumer, need not also pay close attention to), user only needs as the single table of operation
Data equally to access oneself.The MySQL examples of rear end are divided into different logical collections or subregion (Set), such as Fig. 1
In subregion A or subregion C, the data of user be stored in different logical collection or subregion according to the zoning ordinance of cluster.
When the quantity of user is excessive, need logical collection or subregion (Set) carrying out further subregion, to expand in database
Memory capacity.
It is the flow diagram of the first embodiment of method for partitioning database provided in an embodiment of the present invention referring to Fig. 2, it should
Method includes:
Step S201:The second subregion for the first subregion in the database is created in the database, with to the number
It is extended according to the data capacity in library;
Specifically, when user needs the excessive lack of memory capacity for leading to database of the data volume that stores or user
When needing to carry out subregion to database, database server is created in the database for the first subregion in the database
Second subregion, by first subregion subregion section Data Migration to second subregion in, with to the data
The capacity in library is extended.
For example, the area segments of the data stored in the first subregion in the database are 0-9999, when positioned at the area
It when the data volume of domain section is excessive, needs to divide the data in first subregion, thus by subregion therein section
Data Migration to another new district in, to ensure that the new data being continuously added in database can carry out normal storage, be
The size of data of each subregion of guarantee is almost the same, we can be by the 5000-9999 area segments pair in first subregion
In the Data Migration answered to second subregion newly created, and in first subregion retain 0-4999 area segments number
According to wherein during carrying out Data Migration, there are still the area segments of 5000-9999 and the areas in first subregion
Data in the section of domain, and after migration is completed, to the area segments and the area segments of the 5000-9999 in first subregion
In corresponding data deleted.
Step S203:The target data in first subregion is copied to second subregion in first time point,
Described in target data include the first time point stored in first subregion before static object data and described
One time point, second time point was by the static state in first subregion to the dynamic object data between the second time point
Target data is all copied to time point when second subregion;
Specifically, in order under the premise of not stopping database service, ensure the integrality of migrating data, number can be passed through
The full dose mirror image of target data is done according to MySQLdump (utility program for storing up database in MySQL for unloading) tool in library,
Carry out the duplication operation of data.Before the wherein described target data includes the first time point stored in first subregion
Static object data and the first time point are to the dynamic object data between the second time point.When determining described
After the data area section migrated in one subregion, proceeds by data in first time point and replicate, i.e., by described first
The corresponding static object data of data area section migrated in subregion are copied in second subregion, at second
Between point complete to the static object data in the first subregion of the first time point foregoing description whole replicate.And it is being replicated
During data, i.e., between first time point and the second time point, first subregion still can be counted normally
According to operations such as storage or data modifications, and second subregion does not carry out normal use, therefore corresponding described second point also at this time
The new data of the 5000-9999 area segments in area still stores in the 5000-9999 area segments in first subregion, and is depositing
After entering first subregion, the data that 5000-9999 area segments are in the new data are copied to second subregion
In, to ensure the consistency of migrating data, wherein first time point is to proceed by the time point of data duplication.
Further, if having increased place newly in first subregion between the first time point and second time point
It, then will be before the first time point that stored in first subregion in the dynamic object data of the area segments of second subregion
Static object data are copied to second subregion, and by the dynamic object number of the newly-increased area segments in second subregion
According to being copied to second subregion.
It is the schematic diagram of the time shaft of method for partitioning database provided in an embodiment of the present invention for example, reference can be made to Fig. 2 a, if
The 5000-9999 area segments in the 0-9999 area segments by the first subregion are needed to be divided into second subregion, while will be described
In first subregion in the corresponding Data Migration of 5000-9999 area segments to second subregion, if being proceeded by time point T0
Data replicate, then answer the total data positioned at area segments 5000-9999 stored in the first subregion of the time point T0 foregoing description
System will just be located at the total data of 5000-9999 area segments in time point T1 to second subregion in first subregion
It has been copied to second subregion.And during being replicated, i.e. T0 time points to during T1 time points, if there is new
When being stored in first subregion positioned at the user data of 5000-9999 area segments, need synchronous new data to be copied to described the
In two subregions, to ensure that the consistency of migrating data.
Step S205:In the journal file that second time point begins look for first subregion from described first when
Between point recorded to the data variation for correspond to target data between second time point;
Specifically, it is completed to the static object number in the first subregion of the first time point foregoing description when at the second time point
According to it is whole replicate after, the second subregion needs to check the operation transaction log file of first subregion, and the second subregion is to described
First subregion sends out the request for reading journal file, and first subregion receives request, reads the local behaviour in the database
Make transaction log file, be then forwarded to second subregion, second subregion is chosen in the operation transaction log file
Row format record logs, row format record logs record is every data variation details, that is, include each data become
The letters such as the detailed record changed, including data qualification, the transformation period of the value before data variation, the value after variation and variation generation
Breath, second subregion are recorded according to the operation change of first subregion, are searched from the first time point to described second
The data variation record that the target data is corresponded between time point, including first time point in first subregion to institute
State the static object data between the second time point data variation record and the first time point to second time
The data variation record of dynamic object data between point, records according to the data variation to being copied to second subregion
Data are repaired, to ensure the consistency and integrality of data.
For example, during being replicated, i.e., during the first time point and second time point, described
The situation of change that all data in 0-9999 area segments can be recorded in the operation transaction log file of first subregion, then will wherein
5000-9999 area segments in data be copied to second subregion after, second subregion is needed according to described first point
The data of duplication are repaired in the data variation daily record that 5000-9999 area segments are corresponded in area, and second subregion is described
The static object in 5000-9999 area segments before the first time point is searched in the data variation daily record of first subregion
The data variation of data records, and the regions 5000-9999 are between the first time point and second time point
The data variation record of the dynamic object data of section, according to the data variation of static object data record and the dynamic
Target data data variation record the data of second subregion are carried out it is perfect, to ensure the consistency of Data Migration.
Step S207:It is recorded according to the data variation of the target data, the target is changed in second subregion
Data.
Specifically, second subregion is recorded according to the data variation of the target data, is repaiied in second subregion
Change the target data, when data variation has occurred in the target data before being replicated, i.e., the described target data is being answered
Before system, first subregion has received data operation request of the user to the target data, in first subregion
First data of storage perform the data manipulation, and the change of the target data is also stored in second subregion
Change record, then second subregion is according to the data operating record for corresponding to the target data in first subregion, Ke Yicha
It finds the target data and has been carried out the data manipulation, therefore need not be to first number in second subregion
According to the data manipulation is repeated, to ensure the consistency of Data Migration;When the target data is after being replicated
Data variation, i.e., for the described target data after being replicated, first subregion has received user to the target data
Data operation request, first subregion has received data operation request of the user to the target data, but has moved
First data for moving to second subregion are not carried out the data manipulation, then if do not modified to the data,
Migrating data can be caused inconsistent, therefore second subregion is recorded according to the data variation of first subregion, views institute
It states the first data and performs the data manipulation, then executing the data to first data in second subregion grasps
Make, to ensure data consistency.
For example, the target data includes a static object data a=1, then answered to the target data
When processed, if the static object data a is before being replicated, it is input by user right that the first subregion in the database receives
Data a execution adds 1 operation, then is executed in first subregion to data a's plus 1 operates, and (divided in first subregion
Area A) data log files in can record that " update A Set a=2, where A Set a=1 ", then answer by data a
After in system to described second subregion (subregion B), the data a in second subregion has been carried out the operation at this time, then
The operation note that a is corresponded in second subregion will include " update B Set a=2, where B Set a=1 "
Record, then by checking the journal file of the first subregion and the journal file of the second subregion, could be aware that the data a into
Row has been carried out the operation before replicating, then need not repeat the operation to the data a in the second subregion, so that
The data of the data of second subregion and the same area section in the first subregion ensure consistent.If data a is after being replicated, the number
It is received according to library server and executes the operation requests for adding 1 to data a, data a present in the first subregion can be executed normally at this time
Add 1 operation, become 2, and " update A Set a=2, where can be recorded in the data log files of first subregion
A Set a=1 ", but the data a for being copied to second subregion does not receive the operation requests, therefore in the second subregion
Data a be still 1, then start to check the journal file of first subregion at second time point, find corresponding data a's
Data variation records, i.e., described " update A Set a=2, where A Set a=1 ", then could be aware that data a first
It is updated in subregion, but is not updated in the second subregion, then data a executed in second subregion plus 1 grasps
Make, the data of the second subregion and the data of the same area section in the first subregion just can guarantee unanimously at this time.
Further, it is the second embodiment of method for partitioning database provided in an embodiment of the present invention as shown in Figure 3
Flow diagram, this method include:
Step S301:The second subregion for the first subregion in the database is created in the database;
Specifically, when user needs the excessive lack of memory capacity for leading to database of the data volume that stores or user
When needing to carry out subregion to database, database server is created in the database for the first subregion in the database
Second subregion, by first subregion subregion section Data Migration to second subregion in, with to the data
The capacity in library is extended.
For example, the area segments of the data stored in the first subregion in the database are 0-9999, when positioned at the area
It when the data volume of domain section is excessive, needs to divide the data in first subregion, thus by subregion therein section
Data Migration to another new district in, to ensure that the new data being continuously added in database can carry out normal storage, be
The size of data of each subregion of guarantee is almost the same, we can be by the 5000-9999 area segments pair in first subregion
In the Data Migration answered to second subregion newly created, and in first subregion retain 0-4999 area segments number
According to wherein during carrying out Data Migration, there are still the area segments of 5000-9999 and the areas in first subregion
Data in the section of domain, and after migration is completed, to the area segments and the area segments of the 5000-9999 in first subregion
In corresponding data deleted.
Step S303:The target data in first subregion is copied to second subregion in first time point,
Described in target data include the first time point stored in first subregion before static object data and described
One time point, second time point was by the static state in first subregion to the dynamic object data between the second time point
Target data is all copied to time point when second subregion;
Specifically, in order under the premise of not stopping database service, ensure the integrality of migrating data, number can be passed through
The full dose mirror image of target data is done according to MySQLdump (utility program for storing up database in MySQL for unloading) tool in library,
Carry out the duplication operation of data.Before the wherein described target data includes the first time point stored in first subregion
Static object data and the first time point are to the dynamic object data between the second time point.When determining described
After the data area section migrated in one subregion, proceeds by data in first time point and replicate, i.e., by described first
The corresponding static object data of data area section migrated in subregion are copied in second subregion, at second
Between point complete to the static object data in the first subregion of the first time point foregoing description whole replicate.And it is being replicated
During data, i.e., between first time point and the second time point, first subregion still can be counted normally
According to operations such as storage or data modifications, and second subregion does not carry out normal use, therefore corresponding described second point also at this time
The new data of the 5000-9999 area segments in area still stores in the 5000-9999 area segments in first subregion, and is depositing
After entering first subregion, the data that 5000-9999 area segments are in the new data are copied to second subregion
In, to ensure the consistency of migrating data, wherein first time point is to proceed by the time point of data duplication.
Further, if having increased place newly in first subregion between the first time point and second time point
It, then will be before the first time point that stored in first subregion in the dynamic object data of the area segments of second subregion
Static object data are copied to second subregion, and by the dynamic object number of the newly-increased area segments in second subregion
According to being copied to second subregion.
It is the schematic diagram of the time shaft of method for partitioning database provided in an embodiment of the present invention for example, reference can be made to Fig. 2 a, if
The 5000-9999 area segments in the 0-9999 area segments by the first subregion are needed to be divided into second subregion, while will be described
In first subregion in the corresponding Data Migration of 5000-9999 area segments to second subregion, if being proceeded by time point T0
Data replicate, then answer the total data positioned at area segments 5000-9999 stored in the first subregion of the time point T0 foregoing description
System will just be located at the total data of 5000-9999 area segments in time point T1 to second subregion in first subregion
It has been copied to second subregion.And during being replicated, i.e. T0 time points to during T1 time points, if there is new
When being stored in first subregion positioned at the user data of 5000-9999 area segments, need synchronous new data to be copied to described the
In two subregions, to ensure that the consistency of migrating data.
Step S305:In the journal file that second time point begins look for first subregion from described first when
Between point recorded to the data variation for correspond to target data between second time point;
Specifically, it is completed to the static object number in the first subregion of the first time point foregoing description when at the second time point
According to it is whole replicate after, the second subregion needs to check the operation transaction log file of first subregion, and the second subregion is to described
First subregion sends out the request for reading journal file, and first subregion receives request, reads the local behaviour in the database
Make transaction log file, be then forwarded to second subregion, second subregion is chosen in the operation transaction log file
Row format record logs, row format record logs record is every data variation details, that is, include each data become
The letters such as the detailed record changed, including data qualification, the transformation period of the value before data variation, the value after variation and variation generation
Breath, second subregion are recorded according to the operation change of first subregion, are searched from the first time point to described second
The data variation record that the target data is corresponded between time point, including first time point in first subregion to institute
State the static object data between the second time point data variation record and the first time point to second time
The data variation record of dynamic object data between point, records according to the data variation to being copied to second subregion
Data are repaired, to ensure the consistency and integrality of data.
For example, during being replicated, i.e., during the first time point and second time point, described
The situation of change that all data in 0-9999 area segments can be recorded in the operation transaction log file of first subregion, then will wherein
5000-9999 area segments in data be copied to second subregion after, second subregion is needed according to described first point
The data of duplication are repaired in the data variation daily record that 5000-9999 area segments are corresponded in area, and second subregion is described
The static object in 5000-9999 area segments before the first time point is searched in the data variation daily record of first subregion
The data variation of data records, and the regions 5000-9999 are between the first time point and second time point
The data variation record of the dynamic object data of section, according to the data variation of static object data record and the dynamic
Target data data variation record the data of second subregion are carried out it is perfect, to ensure the consistency of Data Migration.
Step S307:Judge that the target data is that data variation has occurred before being replicated or after being replicated;
Specifically, after the target data in first subregion is copied to second subregion, judge the target
Data are data variation to have occurred before being replicated, or data variation has occurred after being replicated.If the target
Data are that data variation has occurred before being replicated, and enter step S309, if the target data is after being replicated
Data variation has occurred, enters step S311.
Step S309:To the target data without modification in second subregion;
Specifically, second subregion is recorded according to the data variation of the target data, is repaiied in second subregion
Change the target data, when data variation has occurred in the target data before being replicated, i.e., the described target data is being answered
Before system, first subregion has received data operation request of the user to the target data, in first subregion
First data of storage perform the data manipulation, and the change of the target data is also stored in second subregion
Change record, then second subregion is according to the data operating record for corresponding to the target data in first subregion, Ke Yicha
It finds the target data and has been carried out the data manipulation, therefore need not be to first number in second subregion
According to the data manipulation is repeated, to ensure the consistency of Data Migration.
For example, the target data includes a static object data a=1, then answered to the target data
When processed, if the static object data a is before being replicated, it is input by user right that the first subregion in the database receives
Data a execution adds 1 operation, then is executed in first subregion to data a's plus 1 operates, and (divided in first subregion
Area A) data log files in can record that " update A Set a=2, where A Set a=1 ", then answer by data a
After in system to described second subregion (subregion B), the data a in second subregion has been carried out the operation at this time, then
The operation note that a is corresponded in second subregion will include " update B Set a=2, where B Set a=1 "
Record, then by checking the journal file of the first subregion and the journal file of the second subregion, could be aware that the data a into
Row has been carried out the operation before replicating, then need not repeat the operation to the data a in the second subregion, so that
The data of the data of second subregion and the same area section in the first subregion ensure consistent.
Step S311:It is recorded according to the data variation of the target data, the target is changed in second subregion
Data;
Specifically, when data variation has occurred in the target data after being replicated, i.e., the described target data is being answered
After system, first subregion has received data operation request of the user to the target data, and first subregion receives
Arrived data operation request of the user to the target data, but migrated to second subregion first data not
The data manipulation is executed, then if do not modified to the data, migrating data can be caused inconsistent, therefore described second
Subregion is recorded according to the data variation of first subregion, is viewed first data and is performed the data manipulation, then exists
The data manipulation is executed to first data in second subregion, to ensure data consistency.
For example, if data a, after being replicated, the database server, which receives to execute data a, adds 1 operation to ask
It asks, data a present in the first subregion can be executed normally at this time plus 1 operates, and become 2, and in the data day of first subregion
Can be recorded in will file " update A Set a=2, where A Set a=1 ", but it has been copied to the number of second subregion
The operation requests are not received according to a, therefore the data a in the second subregion is still 1, then starts to check at second time point
The journal file of first subregion, the data variation for finding corresponding data a record, i.e., described " update A Set a=2,
Where A Set a=1 ", then could be aware that data a is updated in the first subregion, but not carried out in the second subregion
Update, then in second subregion execute data a plus 1 operation, at this time the data of the second subregion with it is same in the first subregion
The data of area segments just can guarantee unanimously.
Step S313:The second time described in the journal file of first subregion is begun look at second time point
Point is recorded to the data variation between third time point;
Specifically, if from second time point to the third time point, increased place in first subregion
The second partitioned area section is corresponded in the dynamic object data of the area segments of second subregion or first subregion
In data changed, then the data variation record in the journal file of first subregion is required to look up, and according to institute
The journal file for stating the first subregion copies to the dynamic object data newly increased in second subregion, and by the data of progress
Variation update in the data of second subregion, the third time point be first subregion in second subregion
In data whole consistent time point of same area section, i.e., described second subregion is with first subregion in the same area section
Data just fully synchronized time point.
Step S315:According to data variation record by first subregion from second time point to described the
The dynamic object data of the increased area segments in second subregion are copied to second subregion between three time points, with
And change target data in second subregion, wherein the third time point is first subregion and described second point
Data in same area section whole consistent time point in area;
Specifically, according to the data record daily record in first subregion, by first subregion from the second time point
It is added to second subregion to the data increased newly between third time point, and will be at the second time point between third time point
The data variation record update of data in the second partitioned area section is corresponded in the journal file of first subregion described in
Second subregion, so that the data of second subregion are consistent with the data in first subregion in the same area section.
For example, reference can be made to Fig. 2 a, start the data image for doing target data in the first subregion at T0 time points, at time point
T1 completes the data image and time point T0 of whole static object data pervious to first time point T0 in the first subregion
To the partial data for the area segments being between time point T1 in second subregion, will may be completely in time point T1
The newly-increased data in the second partitioned area section between time point T0 to time point T1 carry out mirror image, therefore in time point T1
Later, it is also necessary to check that time point T0 is increased newly to during time point T1 in first subregion by the journal file of the first subregion
Dynamic object data, to carry out data reparation in second subregion, and during carrying out data reparation, immediately
Between point T1 to during time point T2, it is also possible to have new data and be stored in the first subregion, also need to check first subregion
Journal file, to being repaired to the data in second subregion, the data in time point T2, second subregion
It is consistent substantially with data of the data in first subregion in the same area section.
Step S317:Change the zone name of first subregion;
Specifically, when the data in first subregion are copied to second subregion, and replicate data is repaiied
After multiple, database server changes the zone name of first subregion, such as the zone name Set A of first subregion are repaiied
Set D are changed to, within the of short duration time of modification zone name, all requests for being sent to first subregion can all return to failure,
Data are not had to ensure in handoff procedure, in first subregion to change, and are divided to first subregion
After area's name is successfully modified, the information of first subregion is added in the database server, to ensure described first point
Area can carry out normal use in the database.
Step S319:After changing the zone name of first subregion, the institute stored in first subregion is deleted
State target data and the corresponding area segments of the target data;
Specifically, after having modified the zone name of first subregion, described second point will be corresponded in first subregion
Data in the area segments in area and the area segments are all deleted, and the memory space in first subregion, which is carried out part, to be released
It puts.
Step S321:The zone name of second subregion is set, so that second subregion carries out in the database
It comes into force.
Specifically, in the target data and the corresponding region of the target data that will be stored in first subregion
After section is deleted, when deleted in first subregion it is described be the corresponding area segments of the second subregion and target data after,
The zone name of second subregion is set, such as sets the zone name of second subregion to Set B, and by described second point
The information reporting in area is to the database server, so that second subregion can be answered normally in the database
With.
The above-mentioned method for illustrating the embodiment of the present invention, following for convenient for preferably implementing the embodiment of the present invention
Said program is correspondingly also provided below for coordinating the relevant apparatus for implementing said program.
The structural schematic diagram of the first embodiment of partitions of database device provided in an embodiment of the present invention as shown in Figure 4,
Partitions of database device 40 includes:Creating unit 401, the first copied cells 403, the modification of the first searching unit 405 and first are single
Member 407, wherein
Creating unit 401, for creating the second subregion for the first subregion in the database in the database;
Specifically, when user needs the excessive lack of memory capacity for leading to database of the data volume that stores or user
When needing to carry out subregion to database, creating unit 401 is created in the database for the first subregion in the database
Second subregion, by first subregion subregion section Data Migration to second subregion in, with to the data
The capacity in library is extended.
For example, the area segments of the data stored in the first subregion in the database are 0-9999, when positioned at the area
It when the data volume of domain section is excessive, needs to divide the data in first subregion, thus by subregion therein section
Data Migration to another new district in, to ensure that the new data being continuously added in database can carry out normal storage, be
The size of data of each subregion of guarantee is almost the same, we can be by the 5000-9999 area segments pair in first subregion
In the Data Migration answered to second subregion newly created, and in first subregion retain 0-4999 area segments number
According to wherein during carrying out Data Migration, there are still the area segments of 5000-9999 and the areas in first subregion
Data in the section of domain, and after migration is completed, to the area segments and the area segments of the 5000-9999 in first subregion
In corresponding data deleted.
First copied cells 403, it is described for being copied to the target data in first subregion in first time point
Second subregion, wherein the target data include the first time point stored in first subregion before static object data
And the first time point, to the dynamic object data between the second time point, second time point is by described first point
Static object data in area are all copied to time point when second subregion;
Specifically, in order under the premise of not stopping database service, ensure the integrality of migrating data, number can be passed through
The full dose mirror image of target data is done according to MySQLdump (utility program for storing up database in MySQL for unloading) tool in library,
Carry out the duplication operation of data.Before the wherein described target data includes the first time point stored in first subregion
Static object data and the first time point are to the dynamic object data between the second time point.When determining described
After the data area section migrated in one subregion, the first copied cells 403 proceed by data in first time point and answer
Section corresponding static object data in the data area migrated in first subregion are copied to described second by system
In subregion, completed at the second time point multiple to the whole of the static object data in the first subregion of the first time point foregoing description
System.And during carrying out replicate data, i.e., between first time point and the second time point, first subregion still may be used
To carry out the operations such as normal data storage or data modification, and second subregion does not carry out normal use also at this time, therefore
The new data of the 5000-9999 area segments of corresponding second subregion still stores the 5000-9999 in first subregion
In area segments, and after being stored in first subregion, the data that 5000-9999 area segments are in the new data are replicated
To in second subregion, to ensure the consistency of migrating data, wherein first time point is to proceed by what data replicated
Time point.
Further, if having increased place newly in first subregion between the first time point and second time point
In the dynamic object data of the area segments of second subregion, then the first copied cells 403 will store in first subregion
Static object data before first time point are copied to second subregion, and by newly-increased in the area of second subregion
The dynamic object data of domain section are copied to second subregion.
It is the schematic diagram of the time shaft of method for partitioning database provided in an embodiment of the present invention for example, reference can be made to Fig. 2 a, if
The 5000-9999 area segments in the 0-9999 area segments by the first subregion are needed to be divided into second subregion, while will be described
In first subregion in the corresponding Data Migration of 5000-9999 area segments to second subregion, if being proceeded by time point T0
Data replicate, then answer the total data positioned at area segments 5000-9999 stored in the first subregion of the time point T0 foregoing description
System will just be located at the total data of 5000-9999 area segments in time point T1 to second subregion in first subregion
It has been copied to second subregion.And during being replicated, i.e. T0 time points to during T1 time points, if there is new
When being stored in first subregion positioned at the user data of 5000-9999 area segments, need synchronous new data to be copied to described the
In two subregions, to ensure that the consistency of migrating data.
First searching unit 405, in the journal file that second time point begins look for first subregion
It is recorded from the first time point to the data variation for corresponding to the target data second time point;
Specifically, the first time point foregoing description first is divided when the first copied cells 403 complete at the second time point
After whole duplications of static object data in area, the first searching unit 405 needs to check the operation affairs of first subregion
Journal file, the second subregion send out the request for reading journal file to first subregion, and first subregion receives request, reads
The local operation transaction log file in the database is taken, second subregion is then forwarded to, second subregion is chosen
Row format record logs in the operation transaction log file, what row format record logs recorded is the variation of every data
Details, that is, include the detailed record of each data variation, including the value before data variation, the value after variation and variation occur
The information such as data qualification, transformation period, second subregion are recorded according to the operation change of first subregion, are searched from described
First time point is recorded to the data variation for corresponding to the target data between second time point, including described first
In subregion first time point to the static object data between second time point data variation record and described first
The data variation of time point to the dynamic object data between second time point records, according to data variation record pair
The data for being copied to second subregion are repaired, to ensure the consistency and integrality of data.
For example, during being replicated, i.e., during the first time point and second time point, described
The situation of change that all data in 0-9999 area segments can be recorded in the operation transaction log file of first subregion, then will wherein
5000-9999 area segments in data be copied to second subregion after, second subregion is needed according to described first point
The data of duplication are repaired in the data variation daily record that 5000-9999 area segments are corresponded in area, and second subregion is described
The static object in 5000-9999 area segments before the first time point is searched in the data variation daily record of first subregion
The data variation of data records, and the regions 5000-9999 are between the first time point and second time point
The data variation record of the dynamic object data of section, according to the data variation of static object data record and the dynamic
Target data data variation record the data of second subregion are carried out it is perfect, to ensure the consistency of Data Migration.
First modification unit 407 is repaiied for being recorded according to the data variation of the target data in second subregion
Change the target data.
Specifically, second subregion is recorded according to the data variation of the target data, is repaiied in second subregion
Change the target data, when data variation has occurred in the target data before being replicated, i.e., the described target data is being answered
Before system, first subregion has received data operation request of the user to the target data, in first subregion
First data of storage perform the data manipulation, and the change of the target data is also stored in second subregion
Change record, then second subregion is according to the data operating record for corresponding to the target data in first subregion, Ke Yicha
It finds the target data and has been carried out the data manipulation, therefore need not be to first number in second subregion
According to the data manipulation is repeated, to ensure the consistency of Data Migration;When the target data is after being replicated
Data variation, i.e., for the described target data after being replicated, first subregion has received user to the target data
Data operation request, first subregion has received data operation request of the user to the target data, but has moved
First data for moving to second subregion are not carried out the data manipulation, then if do not modified to the data,
Migrating data can be caused inconsistent, therefore second subregion is recorded according to the data variation of first subregion, views institute
It states the first data and performs the data manipulation, then first change unit 407 in second subregion to first data
The data manipulation is executed, to ensure data consistency.
For example, the target data includes a static object data a=1, then answered to the target data
When processed, if the static object data a is before being replicated, it is input by user right that the first subregion in the database receives
Data a execution adds 1 operation, then is executed in first subregion to data a's plus 1 operates, and (divided in first subregion
Area A) data log files in can record that " update A Set a=2, where A Set a=1 ", then answer by data a
After in system to described second subregion (subregion B), the data a in second subregion has been carried out the operation at this time, then
The operation note that a is corresponded in second subregion will include " update B Set a=2, where B Set a=1 "
Record, then by checking the journal file of the first subregion and the journal file of the second subregion, could be aware that the data a into
Row has been carried out the operation before replicating, then need not repeat the operation to the data a in the second subregion, so that
The data of the data of second subregion and the same area section in the first subregion ensure consistent.If data a is after being replicated, the number
It is received according to library server and executes the operation requests for adding 1 to data a, data a present in the first subregion can be executed normally at this time
Add 1 operation, become 2, and " update A Set a=2, where can be recorded in the data log files of first subregion
A Set a=1 ", but the data a for being copied to second subregion does not receive the operation requests, therefore in the second subregion
Data a be still 1, then start to check the journal file of first subregion at second time point, find corresponding data a's
Data variation records, i.e., described " update A Set a=2, where A Set a=1 ", then could be aware that data a first
It is updated in subregion, but is not updated in the second subregion, then data a executed in second subregion plus 1 grasps
Make, the data of the second subregion and the data of the same area section in the first subregion just can guarantee unanimously at this time.
It will be appreciated that the function of each functional unit of the partitions of database device 40 of the present embodiment can be according to above-mentioned Fig. 2
The method of embodiment of the method implements, and details are not described herein again.
Further, the knot of the second embodiment of partitions of database device provided in an embodiment of the present invention as shown in Figure 5
Structure schematic diagram, partitions of database device 40 include:Creating unit 401, the first copied cells 403, the first searching unit 405 and
Further include judging unit 409, the second searching unit 411, the second copied cells 413, second modification list outside one modification unit 407
Member 415, deleting unit 417 and setting unit 419, wherein
Judging unit 409, for judging that the target data is that number has occurred before being replicated or after being replicated
According to variation;
Specifically, when the target data in first subregion is copied to second subregion by the first copied cells 403
Afterwards, judging unit 409 judges that the target data is data variation to have occurred before being replicated, or sent out after being replicated
Data variation is given birth to.
Second searching unit 411 is begun look at second time point described in the journal file of first subregion
Second time point recorded to the data variation between third time point;
Specifically, if from second time point to the third time point, increased place in first subregion
The second partitioned area section is corresponded in the dynamic object data of the area segments of second subregion or first subregion
In data changed, then the second searching unit 411 requires to look up the data in the journal file of first subregion and becomes
Change record, and needs that the dynamic object data newly increased are copied to described second point according to the journal file of first subregion
Qu Zhong, and by the update to the data of second subregion of the data variation of progress, the third time point is described first point
Data in same area section whole consistent time point in area and second subregion, i.e., described second subregion and described the
Data of one subregion in the same area section just fully synchronized time point.
Second copied cells 413, for according to the data variation record by first subregion from described second when
Between point be copied to institute to the dynamic object data of the increased area segments in second subregion between the third time point
The second subregion is stated, and target data is changed in second subregion, wherein the third time point is first subregion
With the data of same area section whole consistent time point is in second subregion;
Specifically, the second copied cells 413 are according to the data record daily record in first subregion, by first subregion
In from the second time point to the data increased newly third time point be added to second subregion, and will be arrived at the second time point
The data variation of data in the second partitioned area section is corresponded between third time point in the journal file of first subregion
Second subregion is arrived in record update, so that the data in the data of second subregion and first subregion are in the same area
It is consistent in section.
For example, reference can be made to Fig. 2 a, start the data image for doing target data in the first subregion at T0 time points, at time point
T1 completes the data image and time point T0 of whole static object data pervious to first time point T0 in the first subregion
To the partial data for the area segments being between time point T1 in second subregion, will may be completely in time point T1
The newly-increased data in the second partitioned area section between time point T0 to time point T1 carry out mirror image, therefore in time point T1
Later, it is also necessary to check that time point T0 is increased newly to during time point T1 in first subregion by the journal file of the first subregion
Dynamic object data, to carry out data reparation in second subregion, and during carrying out data reparation, immediately
Between point T1 to during time point T2, it is also possible to have new data and be stored in the first subregion, also need to check first subregion
Journal file, to being repaired to the data in second subregion, the data in time point T2, second subregion
It is consistent substantially with data of the data in first subregion in the same area section.
Second modification unit 415, the zone name for changing first subregion;
Specifically, when the data in first subregion are copied to second subregion, and replicate data is repaiied
After multiple, the second modification unit 415 changes the zone name of first subregion, such as by the zone name Set of first subregion
A is revised as Set D, and within the of short duration time of modification zone name, all requests for being sent to first subregion can all return to mistake
It loses, not having data to ensure in handoff procedure, in first subregion changes, and to first subregion
After zone name is successfully modified, the information of first subregion is added in the database server, to ensure described first
Subregion can carry out normal use in the database.
Deleting unit 417, for after changing the zone name of first subregion, deleting and being deposited in first subregion
The target data and the corresponding area segments of the target data of storage;
Specifically, after the second modification unit 415 has modified the zone name of first subregion, deleting unit 417 is by institute
It states the area segments for corresponding to second subregion in the first subregion and the data in the area segments is all deleted, by described first
Memory space in subregion carries out part release.
Setting unit 419, in the target data and the target data that will be stored in first subregion
After corresponding area segments are deleted, the zone name of second subregion is set, so that second subregion is in the database
It comes into force.
Specifically, it is the corresponding area segments of the second subregion and target data when being deleted in first subregion described
Afterwards, the zone name of second subregion is arranged in setting unit 419, such as sets the zone name of second subregion to Set B,
And by the information reporting of second subregion to the database server, so that second subregion can be in the database
Middle carry out normal use.
It will be appreciated that the function of each functional unit of the partitions of database device 40 of the present embodiment can be according to above-mentioned Fig. 3
The method of embodiment of the method implements, and details are not described herein again.
In conclusion by implementing the embodiment of the present invention database can not stopped when data-base cluster off-capacity
In the case of service, online subregion is carried out to database, to be extended to the capacity of database, and according to the behaviour of database
Make journal file, migrating data is repaired, to ensure the consistency and integrality of migrating data.
Unit in all embodiments of the invention or subelement can pass through universal integrated circuit, such as CPU (Central
Processing Unit, central processing unit), or pass through ASIC (Application Specific Integrated
Circuit, application-specific integrated circuit) it realizes.
The step of method of the embodiment of the present invention, sequentially can be adjusted, merges or delete according to actual needs.This hair
The unit of the terminal of bright embodiment can be integrated, further divide or delete according to actual needs.
One of ordinary skill in the art will appreciate that realizing all or part of flow in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, the program can be stored in a computer read/write memory medium
In, the program is when being executed, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, the storage medium can be magnetic
Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access
Memory, RAM) etc..
It is above disclosed to be only a preferred embodiment of the present invention, the power of the present invention cannot be limited with this certainly
Sharp range, those skilled in the art can understand all or part of the processes for realizing the above embodiment, and is weighed according to the present invention
Equivalent variations made by profit requirement, still belong to the scope covered by the invention.
Claims (6)
1. a kind of method for partitioning database, which is characterized in that including:
The second subregion for the first subregion in the database is created in the database, with the data capacity to the database
It is extended;
The target data in first subregion is copied to second subregion in first time point, wherein the target data
Including before the first time point that is stored in first subregion static object data and the first time point to second
Dynamic object data between time point, second time point are that the static object data in first subregion are all multiple
Time point when making to second subregion, the static object data are the part in the whole region section of first subregion
Data in area segments, the dynamic object data are to belong to the data of the subregion section;
From the first time point to described in the journal file that second time point begins look for first subregion
The data variation record of the target data is corresponded between two time points;
It is recorded according to the data variation of the target data, the target data is changed in second subregion;
It is described change the target data in second subregion after, further include:
The second time point to third time described in the journal file of first subregion is begun look at second time point
Data variation record between point;
According to the data variation record by first subregion from second time point to the third time point
The dynamic object data of the increased area segments in second subregion are copied to second subregion, and described second
Target data is changed in subregion, wherein the third time point be first subregion in second subregion be in it is identical
The data of area segments whole consistent time point;
It is described according to the data variation record by first subregion from second time point to the third time point
Between the dynamic object data of the increased area segments in second subregion be copied to second subregion, and described
After changing target data in second subregion, further include:
Change the zone name of first subregion;
After the zone name of first subregion is changed, delete the target data stored in first subregion and
The corresponding area segments of the target data;
After the corresponding area segments of the target data and the target data that will be stored in first subregion are deleted,
The zone name of second subregion is set, so that second subregion comes into force in the database.
2. the method as described in claim 1, which is characterized in that it is described in first time point by the target in first subregion
Data are copied to second subregion and specifically include:
It is in described second point if having been increased newly in first subregion between the first time point and second time point
The dynamic object data of the area segments in area, then the static object number before the first time point that will be stored in first subregion
While according to second subregion is copied to, the dynamic object data of the newly-increased area segments in second subregion are replicated
To second subregion.
3. the method as described in claim 1, which is characterized in that described to begin look for described first point at second time point
From the first time point to the data variation for corresponding to the target data second time point in the journal file in area
After record, recorded according to the data variation of the target data, before changing the target data in second subregion,
Further include:
Judge that the target data is that data variation has occurred before being replicated or after being replicated;
If data variation has occurred in the target data before being replicated, to the target data in second subregion
Without modification;
If data variation has occurred after being replicated in the target data, the data according to the target data are executed
The step of changing record, the target data changed in second subregion.
4. a kind of partitions of database device, which is characterized in that including:
Creating unit, for creating the second subregion for the first subregion in the database in the database, with to the number
It is extended according to the data capacity in library;
First copied cells, for the target data in first subregion to be copied to described second point in first time point
Area, wherein the target data include the first time point stored in first subregion before static object data and institute
First time point is stated to the dynamic object data between the second time point, second time point is will be in first subregion
Static object data are all copied to time point when second subregion, and the static object data are first subregion
The data in the section of subregion in whole region section, the dynamic object data are to belong to the number of the subregion section
According to;
First searching unit, in the journal file that second time point begins look for first subregion from described
One time point recorded to the data variation for corresponding to the target data between second time point;
First modification unit, for being recorded according to the data variation of the target data, in second subregion described in modification
Target data;
The partitions of database device further includes:
Second searching unit, for being begun look at second time point second described in the journal file of first subregion
Time point records to the data variation between third time point;
Second copied cells, for according to the data variation record by first subregion from second time point to institute
The dynamic object data for stating the increased area segments in second subregion between third time point are copied to described second point
Area, and target data is changed in second subregion, wherein the third time point is first subregion and described the
Data in same area section whole consistent time point in two subregions;
The partitions of database device further includes:
Second modification unit, the zone name for changing first subregion;
Deleting unit, for after changing the zone name of first subregion, deleting the institute stored in first subregion
State target data and the corresponding area segments of the target data;
Setting unit, in the target data and the corresponding area of the target data that will be stored in first subregion
After domain section is deleted, the zone name of second subregion is set, so that second subregion comes into force in the database.
5. device as claimed in claim 4, which is characterized in that if first copied cells are specifically used at described first
Between put the dynamic mesh for having increased the area segments in second subregion in first subregion newly between second time point
Data are marked, then the static object data before the first time point stored in first subregion are being copied to described second point
While area, the dynamic object data of the newly-increased area segments in second subregion are copied to second subregion.
6. device as claimed in claim 4, which is characterized in that further include:
Judging unit, for judging that the target data is that data variation has occurred before being replicated or after being replicated;
If data variation has occurred specifically for the target data in the first modification unit before being replicated, described
To the target data without modification in second subregion;If data variation has occurred after being replicated in the target data,
It is then recorded according to the data variation of the target data, the target data is changed in second subregion.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510134427.5A CN104765794B (en) | 2015-03-25 | 2015-03-25 | A kind of method for partitioning database and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510134427.5A CN104765794B (en) | 2015-03-25 | 2015-03-25 | A kind of method for partitioning database and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104765794A CN104765794A (en) | 2015-07-08 |
CN104765794B true CN104765794B (en) | 2018-10-09 |
Family
ID=53647625
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510134427.5A Active CN104765794B (en) | 2015-03-25 | 2015-03-25 | A kind of method for partitioning database and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104765794B (en) |
Families Citing this family (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106294828B (en) * | 2016-08-17 | 2019-05-21 | 华云科技有限公司 | A kind of high QPS data persistence method of subregion fragment |
CN106815318B (en) * | 2016-12-24 | 2020-08-04 | 上海七牛信息技术有限公司 | Clustering method and system for time sequence database |
CN107391755A (en) * | 2017-08-21 | 2017-11-24 | 中国银联股份有限公司 | A kind of data distribution regulation, the method and apparatus of inquiry |
CN107679200A (en) * | 2017-10-11 | 2018-02-09 | 郑州云海信息技术有限公司 | A kind of online data moving method and device |
CN110275772B (en) * | 2018-03-15 | 2022-12-13 | 华为云计算技术有限公司 | Data processing method and related equipment thereof |
CN110825794B (en) | 2018-08-14 | 2022-03-29 | 华为云计算技术有限公司 | Partition merging method and database server |
CN110019148B (en) * | 2018-09-07 | 2021-05-25 | 网联清算有限公司 | Database capacity management method and device, storage medium and computer equipment |
CN114064682B (en) * | 2022-01-17 | 2022-04-08 | 睿至科技集团有限公司 | Information processing method and system based on big data |
CN114491197B (en) * | 2022-04-18 | 2022-07-22 | 孔智科技(徐州)有限公司 | Database expansion method and device based on big data |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102567428A (en) * | 2010-12-30 | 2012-07-11 | 中国移动通信集团浙江有限公司 | Method and device for managing life cycle of online data |
CN102982085A (en) * | 2012-10-31 | 2013-03-20 | 北京奇虎科技有限公司 | System and method of data migration |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6321238B1 (en) * | 1998-12-28 | 2001-11-20 | Oracle Corporation | Hybrid shared nothing/shared disk database system |
-
2015
- 2015-03-25 CN CN201510134427.5A patent/CN104765794B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102567428A (en) * | 2010-12-30 | 2012-07-11 | 中国移动通信集团浙江有限公司 | Method and device for managing life cycle of online data |
CN102982085A (en) * | 2012-10-31 | 2013-03-20 | 北京奇虎科技有限公司 | System and method of data migration |
Also Published As
Publication number | Publication date |
---|---|
CN104765794A (en) | 2015-07-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104765794B (en) | A kind of method for partitioning database and device | |
JP6553822B2 (en) | Dividing and moving ranges in distributed systems | |
Katz et al. | Database support for versions and alternatives of large design files | |
CN110531940B (en) | Video file processing method and device | |
CN104657459B (en) | A kind of mass data storage means based on file granularity | |
CN103870536B (en) | System and method for memory database processing | |
CN105938448A (en) | Method and device used for data replication | |
CN102929884A (en) | Method and device for compressing virtual hard disk image file | |
CN103460197A (en) | Computer system, file management method and metadata server | |
JP2005267600A5 (en) | ||
CN108763578A (en) | A kind of newer method of index file and server | |
CN107451138A (en) | A kind of distributed file system storage method and system | |
CN114036130A (en) | Metadata analysis processing method and device | |
CN106446044A (en) | Storage space reclaiming method and device | |
CN107679182A (en) | A kind of catalogue collocation method and device | |
CN108153804A (en) | A kind of metadata daily record update method of symmetric distributed file system | |
CN105094811A (en) | Method can device for processing events | |
WO2018140840A1 (en) | Management of cloud-based shared content using predictive cost modeling | |
JP2009015644A (en) | Multi-dimensional database construction method, multi-dimensional database construction system, and information processor | |
CN109376152A (en) | Big data system file data preparation method and system | |
CN113760902A (en) | Data splitting method, device, equipment, medium and program product | |
CN110008178B (en) | Distributed file system metadata organization method and device | |
CN109766313A (en) | Geological project data processing method, device and computer equipment | |
Davenport | Design of distributed data base systems | |
JP4268141B2 (en) | Database replication program and database replication apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
EXSB | Decision made by sipo to initiate substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |