Graphical partition management

The previous introduction to the strategies for creating partition table templates and creating automated partition management, which are all implemented manually by calling UDF. Starting from 4.3, MatrixDB has added graphical partition management functions, so that commonly used partition operations in production environments can be completed through the UI.

Graphical partition management is only applicable to Heap+Mars1 storage solutions

1. Create a partition template

First, create a partition table:

CREATE TABLE disk(
    time timestamp with time zone,
    tag_id int,
    read float,
    write float
)
Distributed by (tag_id)
Partition by range(time);

After a few minutes, you can see the partition table in the data table, and there are no subpartitions yet. Click the Partition Number link to enter the Partition Management page. Automated partition management

Then click "Set timing template": Automated partition management

Set tagkey, timekey, and timebucket for partition tables: Automated partition management

2. Timing partition management

The operation of automated partition management also supports graphicalization and supports mars_time_series policy, including the following 3 actions:

  1. auto_create: create partition in advance
  2. compress: expired automatic compression
  3. Retention: Automatically delete after the expiration date

These three sections are not enabled by default and need to be enabled manually Automated partition management

2.1 Create partitions in advance

After clicking "Enable" in the "Create Partition in advance", you can set the time and partition span for creating partitions in advance: Automated partition management After setting up, click Save. You will see the following interface, which displays the current configuration information. If you want to modify the configuration, click the edit icon and you will re-enter the editing interface. Automated partition management

2.2 Expired automatic compression

The "Expired Automatic Compression" section can set how long after the expired partition is compressed: Automated partition management

2.3 Automatically delete after the period

The "Automatic Delete Overdue" section can set how long the partition will be cleaned, and the cleaned data will not be retrieved: Automated partition management