On Mon, Feb 14, 2011 at 12:40 PM, Ahmed Ossama <ahmed@xxxxxxxxxxx> wrote: > I did a REINDEX and ANALYZE on the table, disabled the seqscan and ran the > query again with the same result. > > My question how do I make PostgreSQL always uses bitmap scan instead of seq > scan? > > Any advice is very much appreciated. > Have a look at the config parameters related to sequential page cost and random page cost. Perhaps you need to adjust the ratio between them to better suit your hardware. The planner may nudge itself over to the index scan if it thinks it won't be too expensive. Also, I'm not sure the default sample size for analyze in 8.4, but it should probably be set to 100 if it is not already. -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general