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.

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

2.1 Create partitions in advance

The "Partition Creation in advance" section will be enabled by default. You can set the partition span and the time for partition creation in advance: Automated partition management

2.2 Expired automatic compression

The "Expired Automatic Compression" section will be enabled by default. You 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 is not enabled by default and needs to be enabled manually: Automated partition management

After turning on, you can set how long it takes to clean the partition before it is cleaned, and the cleaned data will not be retrieved: Automated partition management