Re: Query only slow on first run

Поиск
Список
Период
Сортировка
От Andrew Sullivan
Тема Re: Query only slow on first run
Дата
Msg-id 20071127165543.GY11978@crankycanuck.ca
обсуждение исходный текст
Ответ на Query only slow on first run  (cluster <skrald@amossen.dk>)
Ответы Re: Query only slow on first run
Список pgsql-performance
On Tue, Nov 27, 2007 at 05:33:36PM +0100, cluster wrote:
> I have a query that takes about 7000 ms in average to complete the first
> time it runs. Subsequent runs complete in only 50 ms. That is more than
> a factor 100 faster! How can I make the query perform good in the first
> run too?

Probably by buying much faster disk hardware.  You'll note that the query
plans you posted are the same, except for the actual time it took to get the
results back.  That tells me you have slow storage.  On subsequent runs,
the data is cached, so it's fast.

A

--
Andrew Sullivan
Old sigs will return after re-constitution of blue smoke

В списке pgsql-performance по дате отправления:

Предыдущее
От: cluster
Дата:
Сообщение: Query only slow on first run
Следующее
От: Kevin Kempter
Дата:
Сообщение: Re: Query only slow on first run