Skip site navigation (1) Skip section navigation (2)

Re: Weird 8.2.4 performance

From: Mark Kirkwood <markir(at)paradise(dot)net(dot)nz>
To: Kurt Overberg <kurt(at)hotdogrecords(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Weird 8.2.4 performance
Date: 2007-06-07 00:01:51
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
Kurt Overberg wrote:

> Explain Outputs:
> -- 8.2

>    ->  Bitmap Heap Scan on taskinstance  (cost=20.71..2143.26 rows=556 
> width=8) (actual time=421.423..5655.745 rows=98 loops=9)
>          Recheck Cond: (taskinstance.taskid =
>          ->  Bitmap Index Scan on taskid_taskinstance_key  
> (cost=0.00..20.57 rows=556 width=0) (actual time=54.709..54.709 rows=196 
> loops=9)

> -- 8.0

>    ->  Index Scan using taskid_taskinstance_key on taskinstance  
> (cost=0.00..2152.28 rows=563 width=8) (actual time=0.012..0.832 rows=145 
> loops=11)

8.2 is deciding to use a bitmap index scan on taskid_taskinstance_key, 
which seems to be slower (!) than a plain old index scan that 8.0 is 
using. A dirty work around is to disable bitmap scans via:

SET enable_bitmapscan=off

but it is probably worthwhile to try to find out *why* the bitmap scan 
is 1) slow and 2) chosen at all given 1).

One thought that comes to mind - is work_mem smaller on your 8.2 system 
than the 8.0 one? (or in fact is it very small on both?). Also it might 
be interesting to see your non-default postgresql.conf settings for both 



In response to


pgsql-performance by date

Next:From: Michael GlaesemannDate: 2007-06-07 00:14:17
Subject: Re: Weird 8.2.4 performance
Previous:From: Kurt OverbergDate: 2007-06-06 23:27:27
Subject: Weird 8.2.4 performance

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group