Re: Slow query - possible bug?

Поиск
Список
Период
Сортировка
От chris smith
Тема Re: Slow query - possible bug?
Дата
Msg-id 3c1395330604130546g6b091f75x511955817fe65dcd@mail.gmail.com
обсуждение исходный текст
Ответ на Slow query - possible bug?  (Gavin Hamill <gdh@laterooms.com>)
Ответы Re: Slow query - possible bug?  (Gavin Hamill <gdh@laterooms.com>)
Список 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 по дате отправления:

Предыдущее
От: Gavin Hamill
Дата:
Сообщение: Slow query - possible bug?
Следующее
От: Gavin Hamill
Дата:
Сообщение: Re: Slow query - possible bug?