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

Database partition maintenance method and device

A technology for maintaining devices and databases, applied in the field of data processing, which can solve problems such as failure to create new partitions and partition creation failures, and achieve the effect of avoiding partition creation failures

Active Publication Date: 2018-06-19
RUN TECH CO LTD BEIJING
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] Embodiments of the present invention provide a method and device for maintaining database partitions, which are used to solve the problem in the prior art that new partitions cannot be created in existing table spaces, resulting in failure to create partitions

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
  • Database partition maintenance method and device
  • Database partition maintenance method and device
  • Database partition maintenance method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0036] In this embodiment, a parameter n needs to be set at first, and this parameter n represents the maximum number of partitions that can be created in the table space;

[0037] Such as Figure 2A As shown, the specific implementation process of regularly deleting tablespaces is as follows:

[0038] Step 201: regularly judge whether there is a partition that needs to be deleted; if so, then go to step 202, otherwise, go to step 205;

[0039] In this step, it can be determined whether the storage time of the data in each partition exceeds the validity period, if so, the partition needs to be deleted, otherwise, the partition does not need to be deleted;

[0040] Step 202: delete the partition that needs to be deleted in the previous step;

[0041] Step 203: determine whether the table space where the partition to be deleted does not contain any partition, if so, go to step 204, otherwise, go to step 205;

[0042] Step 204: delete the table space that does not contain any ...

Embodiment 2

[0053] In order to enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below by taking a database table storing user log data of a certain website as an example. In the method for regularly maintaining partitions in this embodiment, table spaces are created and deleted regularly, and the process will be described in detail below. The partition key value of the database table is the operation time, and a partition is created every hour to store the log data within that hour.

[0054] In this embodiment, it is first necessary to set the maximum number of partitions that can be stored in the table space. For example, setting the number to 100 means that the upper limit of the number of partitions in each table space is 100. When the number of partitions in the table space reaches the upper limit, no new partitions can be created in this table space .

[0055] Step 1: The timing scheduler judges at...

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

An embodiment of the invention discloses a partition maintenance method and device of a database and relates to the data processing field. The partition maintenance method and device of the database is used for solving the problem of the partition creation failure due to the fact that a new partition cannot be created in the existing table space in the prior art. The partition maintenance method comprises deleting a created table space to release resources occupied by the table space when the created table space does not contain any partition and utilizing currently available resources to create a new table space and creating partitions in the new table space when the partitions need to be created but cannot be created in the existing table space. Accordingly, the problem of the partition creation failure due to the fact that the new partition cannot be created in the existing table space in the prior art is solved.

Description

technical field [0001] The invention relates to the field of data processing, in particular to a database partition maintenance method and device. Background technique [0002] In database application technology, the storage of massive data generally uses partitioning technology. This technology is to divide a large table into multiple small tables according to certain rules and store them in different areas, so that logically, a table can be stored in different locations like multiple tables when physically stored. , simplifies database management activities, and can also improve application performance. Since the optimizer has knowledge of the range values ​​used as the basis for partitioning, it can directly query only specific partitions when accessing a table. Because only a small amount of data is browsed during the query process, query performance is naturally improved. At the same time, because the external interface is still a table, the application is transparen...

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 Patents(China)
IPC IPC(8): G06F17/30
CPCG06F16/2282G06F16/24554
Inventor 刘金晶
Owner RUN TECH CO LTD BEIJING