在mariaDB中列出内部列表分区的子目录

时间:2017-06-21 10:04:37

标签: mariadb partitioning database-partitioning

    ALTER TABLE ticket_details PARTITION BY LIST(ticket_status_id)
SUBPARTITION BY LIST(ticket_type_id)
   (
   PARTITION QTR1 VALUES IN (1)
   (
       SUBPARTITION  sQTR1 VALUES IN (1),
       SUBPARTITION  sQTR2 VALUES IN (2)
   ),
   PARTITION QTR2 VALUES IN (2)
    (
       SUBPARTITION  s2QTR1 VALUES IN (1),
       SUBPARTITION  s2QTR2 VALUES IN (2)
   ),
   PARTITION QTR3 VALUES IN (3)
   (
       SUBPARTITION  s3QTR1 VALUES IN (1),
       SUBPARTITION  s3QTR2 VALUES IN (2)
   ),
   PARTITION QTR4 VALUES IN (4),
   (
       SUBPARTITION  s4QTR1 VALUES IN (1),
       SUBPARTITION  s4QTR2 VALUES IN (2)
   ),
   PARTITION QTR5 VALUES IN (15)
   (
       SUBPARTITION  s5QTR1 VALUES IN (1),
       SUBPARTITION  s5QTR2 VALUES IN (2)
   ),
   PARTITION QTR6 VALUES IN (NULL)
   (
       SUBPARTITION  snQTR1 VALUES IN (1),
       SUBPARTITION  snQTR2 VALUES IN (2)
   ),
   PARTITION QTR7 VALUES IN (0)
   (
       SUBPARTITION  s0QTR1 VALUES IN (1),
       SUBPARTITION  s0QTR2 VALUES IN (2)
   )
   );

我正在尝试运行此查询以进行子分区,但它给了我这个错误。我尝试了很多组合,但当我按列表尝试子分区时,没有任何工作。是否可以按列表进行子分区

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'LIST (ticket_type_id)

1 个答案:

答案 0 :(得分:3)

您无法进行子分区BY LISTMariaDBMySQL中的SUBPARTITION类型都限制为HASHKEY