最近发现POSTGRESQL的一张表(下面统称为test表)达到67G大小,不得不进行重新分区,下面记录一下步骤: 前言.查看数据表结构(表结构肯定是虚构的) CREATE TABLE test ( id integer NOT NULL DEFAULT , logday character varying, -- 登录日期 CONSTRAINT test PRIMARY KEY (id) ); 一.正式开始-在dw模式下面创建这个父亲表 CREATE TABLE dw.test ( id in…
1.分区的原因 (1)Tables greater than 2GB should always be considered for partitioning. (2)Tables containing historical data, in which new data is added into the newest partition. A typical example is a historical table where only the current …
是否支持分区:mysql> show variables like '%partition%';+-----------------------+-------+| Variable_name | Value |+-----------------------+-------+| have_partition_engine | YES |+-----------------------+-------+1 row in set (0.00 sec) 如果没有看到变量have_partition_…