Re: Using Bitmap scan instead of Seq scan - Mailing list pgsql-general

From Vick Khera
Subject Re: Using Bitmap scan instead of Seq scan
Date
Msg-id AANLkTinvzXGkf=FZU=SS73DccGhqhm3QY86X53qRL4sv@mail.gmail.com
Whole thread Raw
In response to Using Bitmap scan instead of Seq scan  (Ahmed Ossama <ahmed@aossama.net>)
List pgsql-general
On Mon, Feb 14, 2011 at 12:40 PM, Ahmed Ossama <ahmed@aossama.net> 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.

pgsql-general by date:

Previous
From: Christian Ullrich
Date:
Subject: Re: Multithreaded query onto 4 postgresql instances
Next
From: Dmitriy Igrishin
Date:
Subject: Re: SELECT INTO array[i] with PL/pgSQL