• 创建数据库表。
  • 创建一个复制表。
  1. create table t1 (c1 int primary key, c2 int, c3 int, index i1 (c2));
  • 创建hash分区,分区数为8的表。
  • 创建一级分区为range分区,二级分区为key分区的表。
  1. create table t1 (c1 int, c2 int, c3 int)
  2. (partition p0 values less than(0), partition p1 values less than(100));
  • 创建一列为gbk, 一列为utf8的表。
  • 开启encoding并使用zstd压缩,宏块保留空间为5%。
  1. create table t1 (c1 int, c2 int, c3 varchar(64))
  2. ROW_FORMAT dynamic
  3. pctfree 5;