Unlock instant, AI-driven research and patent intelligence for your innovation.

Method and device for changing write-in partitions of database

A database and data block technology, applied in the field of data processing, can solve problems such as unbalanced data fragmentation, achieve the effect of ensuring balanced distribution and avoiding excessive capacity

Active Publication Date: 2017-03-15
BEIJING GRIDSUM TECH CO LTD
View PDF4 Cites 6 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] In view of this, the present invention proposes a method and device for writing database changes into partitions, the main purpose of which is to solve the problem of unbalanced data fragmentation when selecting monotonically increasing shard keys for partitioning in database fragmentation clusters

Method used

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

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for changing write-in partitions of database
  • Method and device for changing write-in partitions of database
  • Method and device for changing write-in partitions of database

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0020] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided for more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0021] In the business that uses the database, with the development of the business, the amount of data generated is also increasing, so the database architecture based on data sharding emerges as the times require. Data sharding is to distribute the overall data on multiple storage devices, so that the data volume of each storage device is relatively small, so as to meet the performance requirements of the database. When setting u...

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

PUM

No PUM Login to View More

Abstract

The invention discloses a method and device for changing write-in partitions of a database, relates to the field of data processing and solves the problem that data fragmentation is unbalanced when monotone increasing slice keys are selected in a database fragmentation cluster for partitioning. The method disclosed by the invention comprises the steps that a time slice key scope of a newest data block in a current fragment of the database is acquired, wherein the newest data block is a data block of currently written-in data; a pre-split time point is determined in the time slice key scope; the newest data block is split at the pre-split time point; two sub-data blocks are generated; and the sub-data block which takes the pre-split time point as a starting point of the time slice key scope is moved to another fragment. The method and the device disclosed by the invention are mainly used for balanced distribution of the written-in data in the database.

Description

technical field [0001] The invention relates to the field of data processing, in particular to a method and a device for modifying and writing a database into a partition. Background technique [0002] In the sharding cluster of MongoDB database, the shard key determines which shard in the cluster each piece of data should be written to, and the movement of data blocks between shards achieves shard load balance. Therefore, when setting shards , you need to select a key from the data collection, and use this key as the basis for data splitting. This key is the shard key. The choice of shard key is very important. MongoDB will divide the data into data blocks with the same shard key according to the selected shard key, and then these data blocks will be distributed to the shards according to the approximate order of the shard keys. However, when the load of data writing is large and a monotonically increasing shard key such as time monotonically increasing shard key is select...

Claims

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

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F17/30
CPCG06F16/21
Inventor 石岱曦
Owner BEIJING GRIDSUM TECH CO LTD