Re: Bitmap Heap Scan takes a lot of time

From: mateo21(at)siteduzero(dot)com
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Bitmap Heap Scan takes a lot of time
Date: 2008-04-23 14:29:46
Message-ID: 07284e77-a6b4-44a8-94d9-7e1109df335d@w7g2000hsa.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 23 avr, 14:12, st(dot)(dot)(dot)(at)enterprisedb(dot)com (Gregory Stark) wrote:
> <mate(dot)(dot)(dot)(at)siteduzero(dot)com> writes:
> > This is the result of an EXPLAIN:
> >...
> > I suppose that the problem comes from the Bitmap Heap Scan which costs
> > a lot, but I can't be totally sure.
>
> > Any idea on where I should be investigating ?
>
> Try posting an EXPLAIN ANALYZE which will actually run the query and include
> information to compare against the estimates.
>
> --
>   Gregory Stark
>   EnterpriseDB          http://www.enterprisedb.com
>   Ask me about EnterpriseDB's PostGIS support!
>
> --
> Sent via pgsql-general mailing list (pgsql-gene(dot)(dot)(dot)(at)postgresql(dot)org)
> To make changes to your subscription:http://www.postgresql.org/mailpref/pgsql-general

Thanks for your answer. Here is the EXPLAIN ANALYZE of this query:

Limit (cost=392.43..392.43 rows=1 width=4) (actual
time=689.016..689.017 rows=1 loops=1)"
-> Sort (cost=392.22..392.43 rows=83 width=4) (actual
time=688.552..688.811 rows=1000 loops=1)"
Sort Key: flg_rid"
-> Index Scan using prj_frm_flg_pkey on prj_frm_flg
(cost=0.00..389.58 rows=83 width=4) (actual time=0.186..687.578
rows=1000 loops=1)"
Index Cond: (flg_mid = 3)"
Filter: ((NOT flg_fav) AND (NOT flg_notif) AND (NOT
flg_post))"
Total runtime: 689.092 ms"

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2008-04-23 14:32:20 Re: plpgsql and logical expression evaluation
Previous Message Tom Lane 2008-04-23 14:09:59 Re: Qty of WAL files