【发布时间】:2020-05-07 23:10:34
【问题描述】:
我想禁用子分区表上的索引。当我尝试时,我得到一个错误。
ERROR: cannot drop index mysema.col_extra_val_355_customer_id_idx because index mysema.col_extra_val_customer_id_idx1 requires it HINT: You can drop index mysema.col_extra_val_customer_id_idx1 instead.
该表是一个巨大的表,分区有 1/2 亿行。插入新数据时,拥有索引会导致插入速度变慢。每次插入都会为一个子分区表聚集。为了提高插入速度,我想删除该表的索引,然后重新安装索引。
删除整个表中的索引将花费太多时间,因为有 1/2 的十亿行。我使用 Postgres 11。
【问题讨论】:
标签: postgresql database-partitioning