Re: Slow query - possible bug? - Mailing list pgsql-performance

From chris smith
Subject Re: Slow query - possible bug?
Date
Msg-id 3c1395330604130546g6b091f75x511955817fe65dcd@mail.gmail.com
Whole thread Raw
In response to Slow query - possible bug?  (Gavin Hamill <gdh@laterooms.com>)
Responses Re: Slow query - possible bug?
List pgsql-performance
On 4/13/06, Gavin Hamill <gdh@laterooms.com> wrote:
> laterooms=# explain analyze select allocation0_."ID" as y1_,
> allocation0_."RoomID" as y2_, allocation0_."StatusID" as y4_,
> allocation0_."Price" as y3_, allocation0_."Number" as y5_,
> allocation0_."Date" as y6_ from "Allocation" allocation0_ where
> (allocation0_."Date" between '2006-06-09 00:00:00.000000' and
> '2006-06-09 00:00:00.000000')and(allocation0_."RoomID" in(4300591));
>                                                                 QUERY PLAN
>
------------------------------------------------------------------------------------------------------------------------------------------
>  Index Scan using ix_date on "Allocation" allocation0_  (cost=0.00..4.77
> rows=1 width=34) (actual time=1411.325..1689.860 rows=1 loops=1)
>    Index Cond: (("Date" >= '2006-06-09'::date) AND ("Date" <=
> '2006-06-09'::date))
>    Filter: ("RoomID" = 4300591)
>  Total runtime: 1689.917 ms
> (4 rows)

1.6secs isn't too bad on 4.3mill rows...

How many entries are there for that date range?

--
Postgresql & php tutorials
http://www.designmagick.com/

pgsql-performance by date:

Previous
From: Gavin Hamill
Date:
Subject: Slow query - possible bug?
Next
From: Gavin Hamill
Date:
Subject: Re: Slow query - possible bug?