简介
测试分区分桶效果。
分区的基本操作
添加分区
ALTER TABLE v2x_olap_database.government_car
ADD PARTITION p20221203 VALUES LESS THAN ("2022-12-04");
动态分区表不能添加分区,需要转为手动分区表。
查看分区
show partitions from <表名>
删除分区
alter table <表名>
drop partition <分区名>
手动分区表与动态分区表切换
手动转自动
alter table <表名> set ("dynamic_partition.enable" = "true")
注意: 如果设置了 dynamic_partition.start ,则分区范围在偏移量之前的历史分区将被删除
自动转手动
alter table <表名> set ("dynamic_partition.enable" = "false")
分区和分桶
Doris 支持两层的数据划分。第一层是 Partition,支持 Range 和 List 的划分方式。第二层是 Bucket(Tablet),仅支持 Hash 的划分方式。
也可以仅使用一层分区。使用一层分区时,只支持 Bucket 划分。下面我们来分别介绍下分区以及分桶:
-
Partition
- Partition 列可以指定一列或多列,分区列必须为 KEY 列。多列分区的使用方式在后面 多列分区 小结介绍。
- 不论分区列是什么类型,在写分区值时,都需要加双引号。
- 分区数量理论上没有上限。
- 当不使用 Partition 建表时,系统会自动生成一个和表名同名的,全值范围的 Partition。该 Partition 对用户不可见,并且不可删改。
- 创建分区时不可添加范围重叠的分区。
Range 分区
-
分区列通常为时间列,以方便的管理新旧数据。
-
Partition 支持通过
VALUES LESS THAN (...)
仅指定上界,系统会将前一个分区的上界作为该分区的下界,生成一个左闭右开的区间。也支持通过VALUES [...)
指定上下界,生成一个左闭右开的区间。
分区
Range Partition
静态 Range Partition
创建表
CREATE TABLE IF NOT EXISTS example_range_tbl
(
`user_id` LARGEINT NOT NULL COMMENT "用户id",
`date` DATE NOT NULL COMMENT "数据灌入日期时间",
`city` VARCHAR(20) COMMENT "用户所在城市",
`age` SMALLINT COMMENT "用户年龄",
`sex` TINYINT COMMENT "用户性别",
`last_visit_date` DATETIME REPLACE DEFAULT "1970-01-01 00:00:00" COMMENT "用户最后一次访问时间",
`cost` BIGINT SUM DEFAULT "0" COMMENT "用户总消费",
`max_dwell_time` INT MAX DEFAULT "0" COMMENT "用户最大停留时间",
`min_dwell_time` INT MIN DEFAULT "99999" COMMENT "用户最小停留时间"
)
ENGINE=OLAP
AGGREGATE KEY(`user_id`, `date`, `city`, `age`, `sex`)
PARTITION BY RANGE(`date`)
(
PARTITION `p201701` VALUES LESS THAN ("2017-02-01"),
PARTITION `p201702` VALUES LESS THAN ("2017-03-01"),
PARTITION `p201703` VALUES LESS THAN ("2017-04-01")
)
DISTRIBUTED BY HASH(`user_id`) BUCKETS 5
PROPERTIES
(
"replication_num" = "1"
);
容易理解。这里举例说明,当使用 `VALUES LESS THAN (...)` 语句进行分区的增删操作时,分区范围的变化情况:
- 如上 `example_range_tbl` 示例,当建表完成后,会自动生成如下3个分区:
```text
p201701: [MIN_VALUE, 2017-02-01)
p201702: [2017-02-01, 2017-03-01)
p201703: [2017-03-01, 2017-04-01)
```
测试插入数据(下面分别插入对应的分区)
insert into example_range_tbl values(10001,'2017-01-05','北京',30,1,'2017-10-01 17:05:45',2,22,22);
insert into example_range_tbl values(10000,'2017-02-01','北京',20,0,'2017-10-01 06:00:00',20,10,10);
insert into example_range_tbl values(10000,'2017-03-03','北京',20,0,'2017-10-01 07:00:00',15,2,2);
查询创建的分区
SHOW PARTITIONS FROM example_range_tbl;
动态 Range Partition
创建表
CREATE TABLE IF NOT EXISTS example_range_tbl
(
`user_id` LARGEINT NOT NULL COMMENT "用户id",
`date` DATE NOT NULL COMMENT "数据灌入日期时间",
`city` VARCHAR(20) COMMENT "用户所在城市",
`age` SMALLINT COMMENT "用户年龄",
`sex` TINYINT COMMENT "用户性别",
`last_visit_date` DATETIME REPLACE DEFAULT "1970-01-01 00:00:00" COMMENT "用户最后一次访问时间",
`cost` BIGINT SUM DEFAULT "0" COMMENT "用户总消费",
`max_dwell_time` INT MAX DEFAULT "0" COMMENT "用户最大停留时间",
`min_dwell_time` INT MIN DEFAULT "99999" COMMENT "用户最小停留时间"
)
ENGINE=OLAP
AGGREGATE KEY(`user_id`, `date`, `city`, `age`, `sex`)
PARTITION BY RANGE(`date`)()
DISTRIBUTED BY HASH(`user_id`)
PROPERTIES (
"replication_allocation" = "tag.location.default: 1",
"dynamic_partition.enable" = "true",
"dynamic_partition.time_unit" = "DAY",
"dynamic_partition.end" = "3",
"dynamic_partition.prefix" = "p",
"dynamic_partition.buckets" = "10"
);
dynamic_partition.enable: 是否开启动态分区特性,可指定为 true 或 false。默认为 true。
dynamic_partition.time_unit: 动态分区调度的单位,可指定为 DAY WEEK MONTH,当指定为 DAY时,动态创建的分区名后缀格式为yyyyMMdd,例如- - 20200325。当指定为 WEEK 时,动态创建的分区名后缀格式为yyyy_ww即当前日期属于这一年的第几周。当指定为 MONTH 时,动态创建的分区名后缀格式为 yyyyMM,例如 202003。
dynamic_partition.start: 动态分区的开始时间, 以当天为基准,超过该时间范围的分区将会被删除。如果不填写,则默认为Integer.MIN_VALUE 即 -2147483648。
dynamic_partition.end: 动态分区的结束时间, 以当天为基准,会提前创建N个单位的分区范围。
dynamic_partition.prefix: 动态创建的分区名前缀。
dynamic_partition.buckets: 动态创建的分区所对应的分桶数量。
查看分区
show partitions from example_range_tbl;
+-------------+---------------+----------------+---------------------+--------+--------------+----------------------------------------------------------------------------+-----------------+---------+----------------+---------------+---------------------+---------------------+--------------------------+----------+------------+-------------------------+
| PartitionId | PartitionName | VisibleVersion | VisibleVersionTime | State | PartitionKey | Range | DistributionKey | Buckets | ReplicationNum | StorageMedium | CooldownTime | RemoteStoragePolicy | LastConsistencyCheckTime | DataSize | IsInMemory | ReplicaAllocation |
+-------------+---------------+----------------+---------------------+--------+--------------+----------------------------------------------------------------------------+-----------------+---------+----------------+---------------+---------------------+---------------------+--------------------------+----------+------------+-------------------------+
| 12985 | p20230302 | 1 | 2023-03-02 16:47:18 | NORMAL | date | [types: [DATE]; keys: [2023-03-02]; ..types: [DATE]; keys: [2023-03-03]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13006 | p20230303 | 1 | 2023-03-02 16:47:18 | NORMAL | date | [types: [DATE]; keys: [2023-03-03]; ..types: [DATE]; keys: [2023-03-04]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13027 | p20230304 | 1 | 2023-03-02 16:47:18 | NORMAL | date | [types: [DATE]; keys: [2023-03-04]; ..types: [DATE]; keys: [2023-03-05]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13048 | p20230305 | 1 | 2023-03-02 16:47:19 | NORMAL | date | [types: [DATE]; keys: [2023-03-05]; ..types: [DATE]; keys: [2023-03-06]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
+-------------+---------------+----------------+---------------------+--------+--------------+----------------------------------------------------------------------------+-----------------+---------+----------------+---------------+---------------------+---------------------+--------------------------+----------+------------+-------------------------+
4 rows in set (0.00 sec)
可以看到上面的创建了从今天开始后面的3个分区。
插入历史数据看看
insert into example_range_tbl values(10001,'2017-01-05','beijing',30,1,'2017-10-01 17:05:45',2,22,22);
上面的操作以后会报错(说明如果没有对应的历史分区,默认是插入不成功的)
[root@doris1 ~]# cat _load_error_log\?file\=__shard_3%2Ferror_log_insert_stmt_75a4a5394a0a4c4a-a813211947164ecc_75a4a5394a0a4c4a_a813211947164ecc
Reason: no partition for this tuple. tuple=+---------------+---------------+------------------+-----------------+----------------+--------------------+-----------------+-----------------+-----------------+
|(Int128) |(Date) |(Nullable(String))|(Nullable(Int16))|(Nullable(Int8))|(Nullable(DateTime))|(Nullable(Int64))|(Nullable(Int32))|(Nullable(Int32))|
+---------------+---------------+------------------+-----------------+----------------+--------------------+-----------------+-----------------+-----------------+
| 10001| 2017-01-05| beijing| 30| 1| 2017-10-01 17:05:45| 2| 22| 22|
+---------------+---------------+------------------+-----------------+----------------+--------------------+-----------------+-----------------+-----------------+
. src line [];
开启历史分区
create_history_partition = true
1)dynamic_partition.history_partition_num 未设置,即 -1;expect_create_partition_num = end - start;
2)dynamic_partition.history_partition_num 已设置 expect_create_partition_num = end - max(start, -histoty_partition_num);
create_history_partition = false 不会创建历史分区,expect_create_partition_num = end - 0;
当 expect_create_partition_num 大于 max_dynamic_partition_num(默认500)时,禁止创建过多分区。
注意:dynamic_partition.start 与 `expect_create_partition_num``如果未设置,则无法创建历史分区
建表语句
CREATE TABLE IF NOT EXISTS example_range_tbl
(
`user_id` LARGEINT NOT NULL COMMENT "用户id",
`date` DATE NOT NULL COMMENT "数据灌入日期时间",
`city` VARCHAR(20) COMMENT "用户所在城市",
`age` SMALLINT COMMENT "用户年龄",
`sex` TINYINT COMMENT "用户性别",
`last_visit_date` DATETIME REPLACE DEFAULT "1970-01-01 00:00:00" COMMENT "用户最后一次访问时间",
`cost` BIGINT SUM DEFAULT "0" COMMENT "用户总消费",
`max_dwell_time` INT MAX DEFAULT "0" COMMENT "用户最大停留时间",
`min_dwell_time` INT MIN DEFAULT "99999" COMMENT "用户最小停留时间"
)
ENGINE=OLAP
AGGREGATE KEY(`user_id`, `date`, `city`, `age`, `sex`)
PARTITION BY RANGE(`date`)()
DISTRIBUTED BY HASH(`user_id`)
PROPERTIES (
"replication_allocation" = "tag.location.default: 1",
"dynamic_partition.enable" = "true",
"dynamic_partition.time_unit" = "DAY",
"dynamic_partition.end" = "5",
"dynamic_partition.prefix" = "p",
"dynamic_partition.buckets" = "10",
"dynamic_partition.create_history_partition" = "true",
"dynamic_partition.start" = "-10"
);
查看分区
show partitions from example_range_tbl;
+-------------+---------------+----------------+---------------------+--------+--------------+----------------------------------------------------------------------------+-----------------+---------+----------------+---------------+---------------------+---------------------+--------------------------+----------+------------+-------------------------+| PartitionId | PartitionName | VisibleVersion | VisibleVersionTime | State | PartitionKey | Range | DistributionKey | Buckets | ReplicationNum | StorageMedium | CooldownTime | RemoteStoragePolicy | LastConsistencyCheckTime | DataSize | IsInMemory | ReplicaAllocation |+-------------+---------------+----------------+---------------------+--------+--------------+----------------------------------------------------------------------------+-----------------+---------+----------------+---------------+---------------------+---------------------+--------------------------+----------+------------+-------------------------+
| 13071 | p20230220 | 1 | 2023-03-02 17:05:30 | NORMAL | date | [types: [DATE]; keys: [2023-02-20]; ..types: [DATE]; keys: [2023-02-21]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13092 | p20230221 | 1 | 2023-03-02 17:05:30 | NORMAL | date | [types: [DATE]; keys: [2023-02-21]; ..types: [DATE]; keys: [2023-02-22]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13113 | p20230222 | 1 | 2023-03-02 17:05:30 | NORMAL | date | [types: [DATE]; keys: [2023-02-22]; ..types: [DATE]; keys: [2023-02-23]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13134 | p20230223 | 1 | 2023-03-02 17:05:30 | NORMAL | date | [types: [DATE]; keys: [2023-02-23]; ..types: [DATE]; keys: [2023-02-24]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13155 | p20230224 | 1 | 2023-03-02 17:05:30 | NORMAL | date | [types: [DATE]; keys: [2023-02-24]; ..types: [DATE]; keys: [2023-02-25]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13176 | p20230225 | 1 | 2023-03-02 17:05:30 | NORMAL | date | [types: [DATE]; keys: [2023-02-25]; ..types: [DATE]; keys: [2023-02-26]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13197 | p20230226 | 1 | 2023-03-02 17:05:30 | NORMAL | date | [types: [DATE]; keys: [2023-02-26]; ..types: [DATE]; keys: [2023-02-27]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13218 | p20230227 | 1 | 2023-03-02 17:05:30 | NORMAL | date | [types: [DATE]; keys: [2023-02-27]; ..types: [DATE]; keys: [2023-02-28]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13239 | p20230228 | 1 | 2023-03-02 17:05:30 | NORMAL | date | [types: [DATE]; keys: [2023-02-28]; ..types: [DATE]; keys: [2023-03-01]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13260 | p20230301 | 1 | 2023-03-02 17:05:30 | NORMAL | date | [types: [DATE]; keys: [2023-03-01]; ..types: [DATE]; keys: [2023-03-02]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13281 | p20230302 | 1 | 2023-03-02 17:05:30 | NORMAL | date | [types: [DATE]; keys: [2023-03-02]; ..types: [DATE]; keys: [2023-03-03]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13302 | p20230303 | 1 | 2023-03-02 17:05:30 | NORMAL | date | [types: [DATE]; keys: [2023-03-03]; ..types: [DATE]; keys: [2023-03-04]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13323 | p20230304 | 1 | 2023-03-02 17:05:30 | NORMAL | date | [types: [DATE]; keys: [2023-03-04]; ..types: [DATE]; keys: [2023-03-05]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13344 | p20230305 | 1 | 2023-03-02 17:05:30 | NORMAL | date | [types: [DATE]; keys: [2023-03-05]; ..types: [DATE]; keys: [2023-03-06]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13365 | p20230306 | 1 | 2023-03-02 17:05:30 | NORMAL | date | [types: [DATE]; keys: [2023-03-06]; ..types: [DATE]; keys: [2023-03-07]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13386 | p20230307 | 1 | 2023-03-02 17:05:30 | NORMAL | date | [types: [DATE]; keys: [2023-03-07]; ..types: [DATE]; keys: [2023-03-08]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
+-------------+---------------+----------------+---------------------+--------+--------------+----------------------------------------------------------------------------+-----------------+---------+----------------+---------------+---------------------+---------------------+--------------------------+----------+------------+-------------------------+
(注意今天的时间是3月2日,上面创建了未来3天的分区和历史10天的分区)
插入数据测试(如果没有分区还是不能自己创建,历史分区也就是自动的创建之前分区的功能)
insert into example_range_tbl values(10001,'2017-01-05','beijing',30,1,'2017-10-01 17:05:45',2,22,22);
下面的数据就能够创建成功
insert into example_range_tbl values(10001,'2023-02-27','beijing',30,1,'2017-10-01 17:05:45',2,22,22);
批量创建分区
批量创建分区功能在前期充分调研了用户的需求,本着简洁、强大、易用的设计目标,将设计核心锁定在几个要素中:
-
时间区间范围(会考虑开闭问题)
-
时间跨度(即每个分区的时间维度的大小)
-
时间单位(年、月、日、时、周等)
建表语句
CREATE TABLE IF NOT EXISTS example_range_tbl1
(
`user_id` LARGEINT NOT NULL COMMENT "用户id",
`date` DATE NOT NULL COMMENT "数据灌入日期时间",
`city` VARCHAR(20) COMMENT "用户所在城市",
`age` SMALLINT COMMENT "用户年龄",
`sex` TINYINT COMMENT "用户性别",
`last_visit_date` DATETIME REPLACE DEFAULT "1970-01-01 00:00:00" COMMENT "用户最后一次访问时间",
`cost` BIGINT SUM DEFAULT "0" COMMENT "用户总消费",
`max_dwell_time` INT MAX DEFAULT "0" COMMENT "用户最大停留时间",
`min_dwell_time` INT MIN DEFAULT "99999" COMMENT "用户最小停留时间"
)
ENGINE=OLAP
AGGREGATE KEY(`user_id`, `date`, `city`, `age`, `sex`)
PARTITION BY RANGE(`date`)
(
FROM ("2000-01-01") TO ("2021-01-01") INTERVAL 1 YEAR,
FROM ("2021-01-01") TO ("2022-01-01") INTERVAL 1 MONTH,
FROM ("2022-01-01") TO ("2023-01-01") INTERVAL 1 WEEK,
FROM ("2023-01-01") TO ("2023-02-01") INTERVAL 1 DAY
)
DISTRIBUTED BY HASH(`user_id`)
PROPERTIES (
"replication_allocation" = "tag.location.default: 1"
);
查看分区数据
mysql> show partitions from example_range_tbl1;
+-------------+---------------+----------------+---------------------+--------+--------------+----------------------------------------------------------------------------+-----------------+---------+----------------+---------------+---------------------+---------------------+--------------------------+----------+------------+-------------------------+
| PartitionId | PartitionName | VisibleVersion | VisibleVersionTime | State | PartitionKey | Range | DistributionKey | Buckets | ReplicationNum | StorageMedium | CooldownTime | RemoteStoragePolicy | LastConsistencyCheckTime | DataSize | IsInMemory | ReplicaAllocation |
+-------------+---------------+----------------+---------------------+--------+--------------+----------------------------------------------------------------------------+-----------------+---------+----------------+---------------+---------------------+---------------------+--------------------------+----------+------------+-------------------------+
| 13408 | p_2000 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2000-01-01]; ..types: [DATE]; keys: [2001-01-01]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13409 | p_2001 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2001-01-01]; ..types: [DATE]; keys: [2002-01-01]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13410 | p_2002 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2002-01-01]; ..types: [DATE]; keys: [2003-01-01]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13411 | p_2003 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2003-01-01]; ..types: [DATE]; keys: [2004-01-01]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13412 | p_2004 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2004-01-01]; ..types: [DATE]; keys: [2005-01-01]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13413 | p_2005 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2005-01-01]; ..types: [DATE]; keys: [2006-01-01]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13414 | p_2006 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2006-01-01]; ..types: [DATE]; keys: [2007-01-01]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13415 | p_2007 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2007-01-01]; ..types: [DATE]; keys: [2008-01-01]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13416 | p_2008 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2008-01-01]; ..types: [DATE]; keys: [2009-01-01]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13417 | p_2009 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2009-01-01]; ..types: [DATE]; keys: [2010-01-01]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13418 | p_2010 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2010-01-01]; ..types: [DATE]; keys: [2011-01-01]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13419 | p_2011 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2011-01-01]; ..types: [DATE]; keys: [2012-01-01]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13420 | p_2012 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2012-01-01]; ..types: [DATE]; keys: [2013-01-01]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13421 | p_2013 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2013-01-01]; ..types: [DATE]; keys: [2014-01-01]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13422 | p_2014 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2014-01-01]; ..types: [DATE]; keys: [2015-01-01]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13423 | p_2015 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2015-01-01]; ..types: [DATE]; keys: [2016-01-01]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13424 | p_2016 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2016-01-01]; ..types: [DATE]; keys: [2017-01-01]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13425 | p_2017 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2017-01-01]; ..types: [DATE]; keys: [2018-01-01]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13426 | p_2018 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2018-01-01]; ..types: [DATE]; keys: [2019-01-01]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13427 | p_2019 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2019-01-01]; ..types: [DATE]; keys: [2020-01-01]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13428 | p_2020 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2020-01-01]; ..types: [DATE]; keys: [2021-01-01]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13429 | p_202101 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2021-01-01]; ..types: [DATE]; keys: [2021-02-01]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13430 | p_202102 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2021-02-01]; ..types: [DATE]; keys: [2021-03-01]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13431 | p_202103 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2021-03-01]; ..types: [DATE]; keys: [2021-04-01]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13432 | p_202104 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2021-04-01]; ..types: [DATE]; keys: [2021-05-01]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13433 | p_202105 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2021-05-01]; ..types: [DATE]; keys: [2021-06-01]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13434 | p_202106 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2021-06-01]; ..types: [DATE]; keys: [2021-07-01]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13435 | p_202107 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2021-07-01]; ..types: [DATE]; keys: [2021-08-01]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13436 | p_202108 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2021-08-01]; ..types: [DATE]; keys: [2021-09-01]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13437 | p_202109 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2021-09-01]; ..types: [DATE]; keys: [2021-10-01]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13438 | p_202110 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2021-10-01]; ..types: [DATE]; keys: [2021-11-01]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13439 | p_202111 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2021-11-01]; ..types: [DATE]; keys: [2021-12-01]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13440 | p_202112 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2021-12-01]; ..types: [DATE]; keys: [2022-01-01]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13441 | p_2022_01 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-01-01]; ..types: [DATE]; keys: [2022-01-03]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13442 | p_2022_02 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-01-03]; ..types: [DATE]; keys: [2022-01-10]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13443 | p_2022_03 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-01-10]; ..types: [DATE]; keys: [2022-01-17]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13444 | p_2022_04 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-01-17]; ..types: [DATE]; keys: [2022-01-24]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13445 | p_2022_05 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-01-24]; ..types: [DATE]; keys: [2022-01-31]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13446 | p_2022_06 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-01-31]; ..types: [DATE]; keys: [2022-02-07]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13447 | p_2022_07 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-02-07]; ..types: [DATE]; keys: [2022-02-14]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13448 | p_2022_08 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-02-14]; ..types: [DATE]; keys: [2022-02-21]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13449 | p_2022_09 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-02-21]; ..types: [DATE]; keys: [2022-02-28]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13450 | p_2022_10 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-02-28]; ..types: [DATE]; keys: [2022-03-07]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13451 | p_2022_11 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-03-07]; ..types: [DATE]; keys: [2022-03-14]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13452 | p_2022_12 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-03-14]; ..types: [DATE]; keys: [2022-03-21]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13453 | p_2022_13 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-03-21]; ..types: [DATE]; keys: [2022-03-28]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13454 | p_2022_14 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-03-28]; ..types: [DATE]; keys: [2022-04-04]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13455 | p_2022_15 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-04-04]; ..types: [DATE]; keys: [2022-04-11]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13456 | p_2022_16 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-04-11]; ..types: [DATE]; keys: [2022-04-18]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13457 | p_2022_17 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-04-18]; ..types: [DATE]; keys: [2022-04-25]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13458 | p_2022_18 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-04-25]; ..types: [DATE]; keys: [2022-05-02]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13459 | p_2022_19 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-05-02]; ..types: [DATE]; keys: [2022-05-09]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13460 | p_2022_20 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-05-09]; ..types: [DATE]; keys: [2022-05-16]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13461 | p_2022_21 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-05-16]; ..types: [DATE]; keys: [2022-05-23]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13462 | p_2022_22 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-05-23]; ..types: [DATE]; keys: [2022-05-30]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13463 | p_2022_23 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-05-30]; ..types: [DATE]; keys: [2022-06-06]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13464 | p_2022_24 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-06-06]; ..types: [DATE]; keys: [2022-06-13]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13465 | p_2022_25 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-06-13]; ..types: [DATE]; keys: [2022-06-20]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13466 | p_2022_26 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-06-20]; ..types: [DATE]; keys: [2022-06-27]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13467 | p_2022_27 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-06-27]; ..types: [DATE]; keys: [2022-07-04]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13468 | p_2022_28 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-07-04]; ..types: [DATE]; keys: [2022-07-11]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13469 | p_2022_29 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-07-11]; ..types: [DATE]; keys: [2022-07-18]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13470 | p_2022_30 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-07-18]; ..types: [DATE]; keys: [2022-07-25]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13471 | p_2022_31 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-07-25]; ..types: [DATE]; keys: [2022-08-01]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13472 | p_2022_32 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-08-01]; ..types: [DATE]; keys: [2022-08-08]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13473 | p_2022_33 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-08-08]; ..types: [DATE]; keys: [2022-08-15]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13474 | p_2022_34 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-08-15]; ..types: [DATE]; keys: [2022-08-22]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13475 | p_2022_35 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-08-22]; ..types: [DATE]; keys: [2022-08-29]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13476 | p_2022_36 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-08-29]; ..types: [DATE]; keys: [2022-09-05]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13477 | p_2022_37 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-09-05]; ..types: [DATE]; keys: [2022-09-12]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13478 | p_2022_38 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-09-12]; ..types: [DATE]; keys: [2022-09-19]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13479 | p_2022_39 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-09-19]; ..types: [DATE]; keys: [2022-09-26]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13480 | p_2022_40 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-09-26]; ..types: [DATE]; keys: [2022-10-03]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13481 | p_2022_41 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-10-03]; ..types: [DATE]; keys: [2022-10-10]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13482 | p_2022_42 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-10-10]; ..types: [DATE]; keys: [2022-10-17]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13483 | p_2022_43 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-10-17]; ..types: [DATE]; keys: [2022-10-24]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13484 | p_2022_44 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-10-24]; ..types: [DATE]; keys: [2022-10-31]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13485 | p_2022_45 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-10-31]; ..types: [DATE]; keys: [2022-11-07]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13486 | p_2022_46 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-11-07]; ..types: [DATE]; keys: [2022-11-14]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13487 | p_2022_47 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-11-14]; ..types: [DATE]; keys: [2022-11-21]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13488 | p_2022_48 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-11-21]; ..types: [DATE]; keys: [2022-11-28]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13489 | p_2022_49 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-11-28]; ..types: [DATE]; keys: [2022-12-05]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13490 | p_2022_50 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-12-05]; ..types: [DATE]; keys: [2022-12-12]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13491 | p_2022_51 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-12-12]; ..types: [DATE]; keys: [2022-12-19]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13492 | p_2022_52 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-12-19]; ..types: [DATE]; keys: [2022-12-26]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13493 | p_2022_53 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2022-12-26]; ..types: [DATE]; keys: [2023-01-01]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13494 | p_20230101 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2023-01-01]; ..types: [DATE]; keys: [2023-01-02]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13495 | p_20230102 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2023-01-02]; ..types: [DATE]; keys: [2023-01-03]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13496 | p_20230103 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2023-01-03]; ..types: [DATE]; keys: [2023-01-04]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13497 | p_20230104 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2023-01-04]; ..types: [DATE]; keys: [2023-01-05]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13498 | p_20230105 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2023-01-05]; ..types: [DATE]; keys: [2023-01-06]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13499 | p_20230106 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2023-01-06]; ..types: [DATE]; keys: [2023-01-07]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13500 | p_20230107 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2023-01-07]; ..types: [DATE]; keys: [2023-01-08]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13501 | p_20230108 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2023-01-08]; ..types: [DATE]; keys: [2023-01-09]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13502 | p_20230109 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2023-01-09]; ..types: [DATE]; keys: [2023-01-10]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13503 | p_20230110 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2023-01-10]; ..types: [DATE]; keys: [2023-01-11]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13504 | p_20230111 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2023-01-11]; ..types: [DATE]; keys: [2023-01-12]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13505 | p_20230112 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2023-01-12]; ..types: [DATE]; keys: [2023-01-13]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13506 | p_20230113 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2023-01-13]; ..types: [DATE]; keys: [2023-01-14]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13507 | p_20230114 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2023-01-14]; ..types: [DATE]; keys: [2023-01-15]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13508 | p_20230115 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2023-01-15]; ..types: [DATE]; keys: [2023-01-16]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13509 | p_20230116 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2023-01-16]; ..types: [DATE]; keys: [2023-01-17]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13510 | p_20230117 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2023-01-17]; ..types: [DATE]; keys: [2023-01-18]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13511 | p_20230118 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2023-01-18]; ..types: [DATE]; keys: [2023-01-19]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13512 | p_20230119 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2023-01-19]; ..types: [DATE]; keys: [2023-01-20]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13513 | p_20230120 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2023-01-20]; ..types: [DATE]; keys: [2023-01-21]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13514 | p_20230121 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2023-01-21]; ..types: [DATE]; keys: [2023-01-22]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13515 | p_20230122 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2023-01-22]; ..types: [DATE]; keys: [2023-01-23]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13516 | p_20230123 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2023-01-23]; ..types: [DATE]; keys: [2023-01-24]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13517 | p_20230124 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2023-01-24]; ..types: [DATE]; keys: [2023-01-25]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13518 | p_20230125 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2023-01-25]; ..types: [DATE]; keys: [2023-01-26]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13519 | p_20230126 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2023-01-26]; ..types: [DATE]; keys: [2023-01-27]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13520 | p_20230127 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2023-01-27]; ..types: [DATE]; keys: [2023-01-28]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13521 | p_20230128 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2023-01-28]; ..types: [DATE]; keys: [2023-01-29]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13522 | p_20230129 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2023-01-29]; ..types: [DATE]; keys: [2023-01-30]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13523 | p_20230130 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2023-01-30]; ..types: [DATE]; keys: [2023-01-31]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 13524 | p_20230131 | 1 | 2023-03-02 17:22:31 | NORMAL | date | [types: [DATE]; keys: [2023-01-31]; ..types: [DATE]; keys: [2023-02-01]; ) | user_id | 10 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
+-------------+---------------+----------------+---------------------+--------+--------------+----------------------------------------------------------------------------+-----------------+---------+----------------+---------------+---------------------+---------------------+--------------------------+----------+------------+-------------------------+
117 rows in set (0.02 sec)
List 分区
-
分区列支持
BOOLEAN, TINYINT, SMALLINT, INT, BIGINT, LARGEINT, DATE, DATETIME, CHAR, VARCHAR
数据类型,分区值为枚举值。只有当数据为目标分区枚举值其中之一时,才可以命中分区。 -
Partition 支持通过
VALUES IN (...)
来指定每个分区包含的枚举值。 -
下面通过示例说明,进行分区的增删操作时,分区的变化。
测试建表
CREATE TABLE IF NOT EXISTS example_range_tbl
(
`user_id` LARGEINT NOT NULL COMMENT "用户id",
`date` DATE NOT NULL COMMENT "数据灌入日期时间",
`city` VARCHAR(20) not NULL COMMENT "用户所在城市",
`age` SMALLINT COMMENT "用户年龄",
`sex` TINYINT COMMENT "用户性别",
`last_visit_date` DATETIME REPLACE DEFAULT "1970-01-01 00:00:00" COMMENT "用户最后一次访问时间",
`cost` BIGINT SUM DEFAULT "0" COMMENT "用户总消费",
`max_dwell_time` INT MAX DEFAULT "0" COMMENT "用户最大停留时间",
`min_dwell_time` INT MIN DEFAULT "99999" COMMENT "用户最小停留时间"
)
ENGINE=OLAP
AGGREGATE KEY(`user_id`, `date`, `city`, `age`, `sex`)
PARTITION BY LIST(city)
(
PARTITION `p_huabei` VALUES IN ("beijing", "tianjin", "shijiazhuang"),
PARTITION `p_dongbei` VALUES IN ("shenyang", "dalian"),
PARTITION `p_huazhong` VALUES IN ("wuhan", "changsha"),
PARTITION `p_xinan` VALUES IN ("chengdu", "chongqing")
)
DISTRIBUTED BY HASH(`user_id`) BUCKETS 5
PROPERTIES
(
"replication_num" = "1"
);
LIST(city) 里面的city字段不能为空
测试数据
insert into example_range_tbl values(10001,'2017-01-05','beijing',30,1,'2017-10-01 17:05:45',2,22,22);
insert into example_range_tbl values(10000,'2017-02-01','tianjin',20,0,'2017-10-01 06:00:00',20,10,10);
insert into example_range_tbl values(10000,'2017-03-03','shenyang',20,0,'2017-10-01 07:00:00',15,2,2);
效果
当我们有了合适的分区分桶时,导入数据导到 Doris 后,数据会依照建表语句中的分区分桶列进行存储。上述网站站点数据的存储示例如图示:
图2:Doris 分区分桶后的数据存储
此时如果执行 SQL 查询:
select * from test_tbl where date = "2020-03-23" and site = 1
根据谓词 date = "2020-03-23" 可以定位到分区 p20200323,谓词 site = 1 能定位到该分区下的 bucket_1。假设有 30 天数据,自动分桶推算得到的分桶个数为 20 个。则经过明确的分区分桶谓词下推,则可以将数据全表扫描量变为原来的 1/600(30 天*20 个桶 = 600),极大减少了数据的扫描范围、提高了查询的效率。
实验
动态分区
创建一个动态分区(现在是3月2日)
CREATE TABLE IF NOT EXISTS example_range_tbl
(
`user_id` LARGEINT NOT NULL COMMENT "用户id",
`date` DATE NOT NULL COMMENT "数据灌入日期时间",
`city` VARCHAR(20) COMMENT "用户所在城市",
`age` SMALLINT COMMENT "用户年龄",
`sex` TINYINT COMMENT "用户性别",
`last_visit_date` DATETIME REPLACE DEFAULT "1970-01-01 00:00:00" COMMENT "用户最后一次访问时间",
`cost` BIGINT SUM DEFAULT "0" COMMENT "用户总消费",
`max_dwell_time` INT MAX DEFAULT "0" COMMENT "用户最大停留时间",
`min_dwell_time` INT MIN DEFAULT "99999" COMMENT "用户最小停留时间"
)
ENGINE=OLAP
AGGREGATE KEY(`user_id`, `date`, `city`, `age`, `sex`)
PARTITION BY RANGE(`date`)()
DISTRIBUTED BY HASH(`user_id`)
PROPERTIES (
"replication_allocation" = "tag.location.default: 1",
"dynamic_partition.enable" = "true",
"dynamic_partition.time_unit" = "DAY",
"dynamic_partition.prefix" = "p",
"dynamic_partition.buckets" = "3",
"dynamic_partition.create_history_partition" = "true",
"dynamic_partition.end" = "2",
"dynamic_partition.start" = "-3"
);
查看现在的分区(可以看到创建了历史3天和未来2天的数据)
mysql> show partitions from example_range_tbl;
+-------------+---------------+----------------+---------------------+--------+--------------+----------------------------------------------------------------------------+-----------------+---------+----------------+---------------+---------------------+---------------------+--------------------------+----------+------------+-------------------------+
| PartitionId | PartitionName | VisibleVersion | VisibleVersionTime | State | PartitionKey | Range | DistributionKey | Buckets | ReplicationNum | StorageMedium | CooldownTime | RemoteStoragePolicy | LastConsistencyCheckTime | DataSize | IsInMemory | ReplicaAllocation |
+-------------+---------------+----------------+---------------------+--------+--------------+----------------------------------------------------------------------------+-----------------+---------+----------------+---------------+---------------------+---------------------+--------------------------+----------+------------+-------------------------+
| 15869 | p20230227 | 1 | 2023-03-02 17:44:48 | NORMAL | date | [types: [DATE]; keys: [2023-02-27]; ..types: [DATE]; keys: [2023-02-28]; ) | user_id | 3 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 15876 | p20230228 | 1 | 2023-03-02 17:44:48 | NORMAL | date | [types: [DATE]; keys: [2023-02-28]; ..types: [DATE]; keys: [2023-03-01]; ) | user_id | 3 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 15883 | p20230301 | 1 | 2023-03-02 17:44:48 | NORMAL | date | [types: [DATE]; keys: [2023-03-01]; ..types: [DATE]; keys: [2023-03-02]; ) | user_id | 3 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 15890 | p20230302 | 1 | 2023-03-02 17:44:48 | NORMAL | date | [types: [DATE]; keys: [2023-03-02]; ..types: [DATE]; keys: [2023-03-03]; ) | user_id | 3 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 15897 | p20230303 | 1 | 2023-03-02 17:44:48 | NORMAL | date | [types: [DATE]; keys: [2023-03-03]; ..types: [DATE]; keys: [2023-03-04]; ) | user_id | 3 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 15904 | p20230304 | 1 | 2023-03-02 17:44:48 | NORMAL | date | [types: [DATE]; keys: [2023-03-04]; ..types: [DATE]; keys: [2023-03-05]; ) | user_id | 3 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
+-------------+---------------+----------------+---------------------+--------+--------------+----------------------------------------------------------------------------+-----------------+---------+----------------+---------------+---------------------+---------------------+--------------------------+----------+------------+-------------------------+
6 rows in set (0.00 sec)
查看第二天的情况 (现在是3月3日)
手动分区实验
建表语句
CREATE TABLE IF NOT EXISTS example_range_tbltest
(
`user_id` LARGEINT NOT NULL COMMENT "用户id",
`date` DATE NOT NULL COMMENT "数据灌入日期时间",
`city` VARCHAR(20) COMMENT "用户所在城市",
`age` SMALLINT COMMENT "用户年龄",
`sex` TINYINT COMMENT "用户性别",
`last_visit_date` DATETIME REPLACE DEFAULT "1970-01-01 00:00:00" COMMENT "用户最后一次访问时间",
`cost` BIGINT SUM DEFAULT "0" COMMENT "用户总消费",
`max_dwell_time` INT MAX DEFAULT "0" COMMENT "用户最大停留时间",
`min_dwell_time` INT MIN DEFAULT "99999" COMMENT "用户最小停留时间"
)
ENGINE=OLAP
AGGREGATE KEY(`user_id`, `date`, `city`, `age`, `sex`)
PARTITION BY RANGE(`date`)
(
PARTITION `p201701` VALUES LESS THAN ("2017-02-01"),
PARTITION `p201702` VALUES LESS THAN ("2017-03-01"),
PARTITION `p201703` VALUES LESS THAN ("2017-04-01")
)
DISTRIBUTED BY HASH(`user_id`) BUCKETS 5
PROPERTIES
(
"replication_num" = "1"
);
查看分区
mysql> show partitions from example_range_tbltest;
+-------------+---------------+----------------+---------------------+--------+--------------+----------------------------------------------------------------------------+-----------------+---------+----------------+---------------+---------------------+---------------------+--------------------------+----------+------------+-------------------------+
| PartitionId | PartitionName | VisibleVersion | VisibleVersionTime | State | PartitionKey | Range | DistributionKey | Buckets | ReplicationNum | StorageMedium | CooldownTime | RemoteStoragePolicy | LastConsistencyCheckTime | DataSize | IsInMemory | ReplicaAllocation |
+-------------+---------------+----------------+---------------------+--------+--------------+----------------------------------------------------------------------------+-----------------+---------+----------------+---------------+---------------------+---------------------+--------------------------+----------+------------+-------------------------+
| 15911 | p201701 | 1 | 2023-03-02 17:52:52 | NORMAL | date | [types: [DATE]; keys: [0000-01-01]; ..types: [DATE]; keys: [2017-02-01]; ) | user_id | 5 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 15912 | p201702 | 1 | 2023-03-02 17:52:52 | NORMAL | date | [types: [DATE]; keys: [2017-02-01]; ..types: [DATE]; keys: [2017-03-01]; ) | user_id | 5 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 15913 | p201703 | 1 | 2023-03-02 17:52:52 | NORMAL | date | [types: [DATE]; keys: [2017-03-01]; ..types: [DATE]; keys: [2017-04-01]; ) | user_id | 5 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
+-------------+---------------+----------------+---------------------+--------+--------------+----------------------------------------------------------------------------+-----------------+---------+----------------+---------------+---------------------+---------------------+--------------------------+----------+------------+-------------------------+
3 rows in set (0.01 sec)
插入数据
insert into example_range_tbltest values(10000,'2017-04-02','shenyang',20,0,'2017-10-01 07:00:00',15,2,2);
下面报错因为没有对应的分区
mysql> insert into example_range_tbltest values(10000,'2017-04-02','shenyang',20,0,'2017-10-01 07:00:00',15,2,2);
ERROR 5025 (HY000): Insert has filtered data in strict mode, tracking_url=http://10.240.0.51:8040/api/_load_error_log?file=__shard_235/error_log_insert_stmt_749a91311755470e-8b2b8b059bce5df2_749a91311755470e_8b2b8b059bce5df2
手动添加一个分区
ALTER TABLE example_range_tbltest ADD PARTITION p201704 VALUES LESS THAN ("2017-05-01");
mysql> show partitions from example_range_tbltest;
+-------------+---------------+----------------+---------------------+--------+--------------+----------------------------------------------------------------------------+-----------------+---------+----------------+---------------+---------------------+---------------------+--------------------------+----------+------------+-------------------------+
| PartitionId | PartitionName | VisibleVersion | VisibleVersionTime | State | PartitionKey | Range | DistributionKey | Buckets | ReplicationNum | StorageMedium | CooldownTime | RemoteStoragePolicy | LastConsistencyCheckTime | DataSize | IsInMemory | ReplicaAllocation |
+-------------+---------------+----------------+---------------------+--------+--------------+----------------------------------------------------------------------------+-----------------+---------+----------------+---------------+---------------------+---------------------+--------------------------+----------+------------+-------------------------+
| 15911 | p201701 | 1 | 2023-03-02 17:52:52 | NORMAL | date | [types: [DATE]; keys: [0000-01-01]; ..types: [DATE]; keys: [2017-02-01]; ) | user_id | 5 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 15912 | p201702 | 1 | 2023-03-02 17:52:52 | NORMAL | date | [types: [DATE]; keys: [2017-02-01]; ..types: [DATE]; keys: [2017-03-01]; ) | user_id | 5 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 15913 | p201703 | 1 | 2023-03-02 17:52:52 | NORMAL | date | [types: [DATE]; keys: [2017-03-01]; ..types: [DATE]; keys: [2017-04-01]; ) | user_id | 5 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
| 15946 | p201704 | 1 | 2023-03-02 17:57:34 | NORMAL | date | [types: [DATE]; keys: [2017-04-01]; ..types: [DATE]; keys: [2017-05-01]; ) | user_id | 5 | 1 | HDD | 9999-12-31 23:59:59 | | NULL | 0.000 | false | tag.location.default: 1 |
+-------------+---------------+----------------+---------------------+--------+--------------+----------------------------------------------------------------------------+-----------------+---------+----------------+---------------+---------------------+---------------------+--------------------------+----------+------------+-------------------------+
4 rows in set (0.00 sec)
然后插入数据(可以看到新的分区插入数据成功)
mysql> insert into example_range_tbltest values(10000,'2017-04-02','shenyang',20,0,'2017-10-01 07:00:00',15,2,2);
Query OK, 1 row affected (0.03 sec)
{'label':'insert_9ef4039c342c494c_aa49e0c045fbcf55', 'status':'VISIBLE', 'txnId':'1030'}
参考资料
一文教你玩转 Apache Doris 分区分桶新功能