CREATE TABLE `t1` (`id` int DEFAULT NULL,`purchased` varchar(12) DEFAULT NULL,KEY `idx` (`id`,`purchased`) GLOBAL) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ciPARTITION BY RANGE (`id`)SUBPARTITION BY LIST COLUMNS (`purchased`)SUBPARTITION TEMPLATE(SUBPARTITION s0 VALUES IN ('0', '1', '2') ENGINE = InnoDB,SUBPARTITION s1 VALUES IN ('5', '6', '8') ENGINE = InnoDB)(PARTITION p0 VALUES LESS THAN (1990) ,PARTITION p1 VALUES LESS THAN (1999));
CREATE TABLE `t2` (`id` int DEFAULT NULL,`purchased` varchar(12) DEFAULT NULL,KEY `idx` (`id`,`purchased`) GLOBAL) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ciPARTITION BY RANGE (`id`)SUBPARTITION BY LIST COLUMNS (`purchased`, `id`)SUBPARTITION TEMPLATE(SUBPARTITION s0 VALUES IN (('0', 1), ('1', 1), ('2', 1995)) ENGINE = InnoDB,SUBPARTITION s1 VALUES IN (('5' ,5), ('6', 6)) ENGINE = InnoDB)(PARTITION p0 VALUES LESS THAN (1990) ,PARTITION p1 VALUES LESS THAN (1999));
CREATE TABLE `t3` (`id` int DEFAULT NULL,`purchased` varchar(12) DEFAULT NULL,KEY `idx` (`id`,`purchased`) GLOBAL) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ciPARTITION BY RANGE (`id`)SUBPARTITION BY RANGE COLUMNS (`purchased`)SUBPARTITION TEMPLATE(SUBPARTITION s0 VALUES LESS THAN ('5') ENGINE = InnoDB,SUBPARTITION s1 VALUES LESS THAN ('8') ENGINE = InnoDB)(PARTITION p0 VALUES LESS THAN (1990) ,PARTITION p1 VALUES LESS THAN (1999));
CREATE TABLE `t4` (`id` int DEFAULT NULL,`purchased` varchar(12) DEFAULT NULL,KEY `idx` (`id`,`purchased`) GLOBAL) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ciPARTITION BY RANGE (`id`)SUBPARTITION BY RANGE COLUMNS (`purchased`, `id`)SUBPARTITION TEMPLATE(SUBPARTITION s0 VALUES LESS THAN ('5', 55) ENGINE = InnoDB,SUBPARTITION s1 VALUES LESS THAN ('8', 88) ENGINE = InnoDB)(PARTITION p0 VALUES LESS THAN (1990) ,PARTITION p1 VALUES LESS THAN (1999));
参数名 | 动态 | 类型 | 默认 | 参数值范围 | 说明 |
txsql_subpartition_support_multiple_columns | yes | bool | OFF | OFF/ON | 限制多列的使用,关闭时只允许使用单列语法,打开时允许多列和单列语法。 |
本页内容是否解决了您的问题?