MySQL查询表分区
select
partition_name part,
partition_expression expr,
partition_description descr,
table_rows
from information_schema.partitions where table_schema = ‘test’
and table_name = ‘http’
以上代码需要修改的部分:
1、table_name = ‘你想查询的表名’
2、table_schema = ‘你想查询的表所属的数据库名’
MYSQL删除表分区
ALTER TABLE http DROP partition p20200423
以上代码需要修改的部分:
1、表名http = ‘你想查询的表名’
2、表的分区名p20200423 = ‘你想查询的表所属的数据库名’
***注意要将时间戳字段设置为key