Re: difficulties with time based queries

From: David Wilson <david(dot)t(dot)wilson(at)gmail(dot)com>
To: Rainer Mager <rainer(at)vanten(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: difficulties with time based queries
Date: 2009-04-05 23:46:34
Message-ID: e7f9235d0904051646j7e8374afncf79e3708ae40c20@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Sun, Apr 5, 2009 at 7:26 PM, Rainer Mager <rainer(at)vanten(dot)com> wrote:
> Bitmap Heap Scan on ad_log  (cost=73372.57..3699152.24 rows=2488252
> width=32) (actual time=49792.862..64611.255 rows=2268490 loops=1)
>
>    Recheck Cond: ((date(start_time) < '2009-03-31'::date) AND
> (date(start_time) >= '2009-03-30'::date))
>
>    ->  Bitmap Index Scan on ad_log_date_all  (cost=0.00..72750.51
> rows=2488252 width=0) (actual time=49776.332..49776.332 rows=2268490
> loops=1)
>
>          Index Cond: ((date(start_time) < '2009-03-31'::date) AND
> (date(start_time) >= '2009-03-30'::date))
>
>  Total runtime: 65279.352 ms

The stats look good and it's using a viable index for your query. What
kind of hardware is this on, and what are the relevant postgresql.conf
lines? (Or, for that matter, what does iostat say while this query's
running?)

--
- David T. Wilson
david(dot)t(dot)wilson(at)gmail(dot)com

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message PFC 2009-04-05 23:54:26 Re: difficulties with time based queries
Previous Message Rainer Mager 2009-04-05 23:26:11 difficulties with time based queries