From: | Mathieu De Zutter <mathieu(at)dezutter(dot)org> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Choice of bitmap scan over index scan |
Date: | 2010-01-11 08:36:40 |
Message-ID: | d4468d971001110036s22796d2bud01f8ec38fd21ce0@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On Mon, Jan 11, 2010 at 3:52 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Sun, Jan 10, 2010 at 10:53 AM, Kevin Grittner
> <Kevin(dot)Grittner(at)wicourts(dot)gov> wrote:
> > seq_page_cost = 0.1
> > random_page_cost = 0.1
>
> These might not even be low enough. The reason why bitmap index scans
> win over plain index scans, in general, is because you make one pass
> through the heap to get all the rows you need instead of bouncing
> around doing lots of random access. But of course if all the data is
> in RAM then this argument falls down.
>
> If these aren't enough to get the query planner to DTRT, then the OP
> might want to try lowering them further and seeing how low he has to
> go to flip the plan...
>
So if this query usually does *not* hit the cache, it will be probably
faster if I leave it like that? While testing a query I execute it that much
that it's always getting into the cache. However, since other applications
run on the same server, I think that infrequently used data gets flushed
after a while, even if the DB could fit in the RAM.
--
Mathieu
From | Date | Subject | |
---|---|---|---|
Next Message | Matthew Wakeling | 2010-01-11 10:36:50 | Re: Choice of bitmap scan over index scan |
Previous Message | Robert Haas | 2010-01-11 02:53:37 | Re: Choice of bitmap scan over index scan |