Why is PostgreSQL not using my indexes on a small table?
问题 I have the following table in PostgreSQL: CREATE TABLE index_test ( id int PRIMARY KEY NOT NULL, text varchar(2048) NOT NULL, last_modified timestamp NOT NULL, value int, item_type varchar(2046) ); CREATE INDEX idx_index_type ON index_test ( item_type ); CREATE INDEX idx_index_value ON index_test ( value ) I make the following selects: explain select * from index_test r where r.item_type='B'; explain select r.value from index_test r where r.value=56; The explanation of execution plan looks