【发布时间】:2020-03-06 09:01:16
【问题描述】:
我想提高对我需要使用的 Postgrsql 数据库中表的查询性能。
CREATE TABLE mytable (
article_number text NOT NULL,
description text NOT null,
feature text NOT null,
...
);
该表只是示例,但问题是没有唯一的列。 article_number 是在 where 子句中使用的,但例如 article_number='000.002-00A' 可以有 3 到 300 行。总行数为 102,165,920。在这种情况下使用的最佳索引是什么?
我知道 postgres 中有 B-tree、Hash、GiST、SP-GiST、GIN 和 BRIN 索引类型,但哪一种最适合。
【问题讨论】: