Replies: 1 comment
-
你是没看懂数据插入的逻辑? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Discussion options
shp1570
17 hours ago
PARTITION BY RANGE(date, id)
(
PARTITION p201701_1000 VALUES LESS THAN ("2017-02-01", "1000"),
PARTITION p201702_2000 VALUES LESS THAN ("2017-03-01", "2000"),
PARTITION p201703_all VALUES LESS THAN ("2017-04-01")
)
在以上示例中,我们指定 date(DATE 类型) 和 id(INT 类型) 作为分区列。以上示例最终得到的分区如下:
p201701_1000: [(MIN_VALUE, MIN_VALUE), ("2017-02-01", "1000") )
p201702_2000: [("2017-02-01", "1000"), ("2017-03-01", "2000") )
p201703_all: [("2017-03-01", "2000"), ("2017-04-01", MIN_VALUE))
数据 --> 分区
2017-01-01, 200 --> p201701_1000
2017-01-01, 2000 --> p201701_1000
2017-02-01, 100 --> p201701_1000
2017-02-01, 2000 --> p201702_2000
2017-02-15, 5000 --> p201702_2000
2017-03-01, 2000 --> p201703_all
2017-03-10, 1 --> p201703_all
2017-04-01, 1000 --> 无法导入
2017-05-01, 1000 --> 无法导入
文档给出的用例,和建表指定的分区,看不出来对应关系,看完不知道多列分区怎么用
Beta Was this translation helpful? Give feedback.
All reactions