Hi,
I'm still having this same problem.
Below is a simple test to show the problem.
Same table as before, but I removed all indices except the itemid
field(serial).
Thanks,
Ole Gjerde
parts=> create index av_parts_nsn_index on av_parts(nsn);
CREATE
parts=> explain select * from av_parts where nsn = '123456';
NOTICE: QUERY PLAN:
Seq Scan on av_parts (cost=194841.86 rows=3206927 width=124)
EXPLAIN
parts=> vacuum verbose av_parts;
NOTICE: --Relation av_parts--
NOTICE: Pages 63834: Changed 0, Reapped 0, Empty 0, New 0; Tup 3969935:
Vac 0, Keep/VTL 0/0, Crash 0, UnUsed 0, MinLen 92, MaxLen 200; Re-using:
Free/Avail. Space 0/0; EndEmpty/Avail. Pages 0/0. Elapsed 29/11 sec.
NOTICE: Index av_parts_nsn_index: Pages 8705; Tuples 3969935. Elapsed
3/75 sec.
NOTICE: Index av_parts_itemid_key: Pages 7818; Tuples 3969935.
Elapsed 3/74 sec.
VACUUM
parts=> explain select * from av_parts where nsn = '123456';
NOTICE: QUERY PLAN:
Seq Scan on av_parts (cost=194841.86 rows=3206927 width=124)
EXPLAIN