浅谈PostgreSQL的索引
1. 索引的特性
1.1 加快条件的检索的特性
当表数据量越来越大时查询速度会下降,在表的条件字段上使用索引,快速定位到可能满足条件的记录,不需要遍历所有记录。
create table t(id int, info text);
insert into t select generate_series(1,10000),
当表数据量越来越大时查询速度会下降,在表的条件字段上使用索引,快速定位到可能满足条件的记录,不需要遍历所有记录。
create table t(id int, info text);
insert into t select generate_series(1,10000),