Re: Function scan/Index scan to nested loop

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: Function scan/Index scan to nested loop
Дата
Msg-id 4BE903C0.4020203@postnewspapers.com.au
обсуждение исходный текст
Ответ на Function scan/Index scan to nested loop  ("Carlo Stonebanks" <stonec.register@sympatico.ca>)
Список pgsql-performance
On 11/05/10 13:32, Carlo Stonebanks wrote:
> Hello all,
>
> A query ran twice in succession performs VERY poorly the first time as
> it iterates through the nested loop. The second time, it rips. Please
> see SQL, SLOW PLAN and FAST PLAN below.

I haven't looked at the details, but the comment you made about it being
fast on the live server which hits this query frequently tends to
suggest that this is a caching issue.

Most likely, the first time Pg has to read the data from disk. The
second time, it's in memory-based disk cache or even in Pg's
shared_buffers, so it can be accessed vastly quicker.

--
Craig Ringer

Tech-related writing: http://soapyfrogs.blogspot.com/

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

Предыдущее
От: Scott Marlowe
Дата:
Сообщение: Re: Function scan/Index scan to nested loop
Следующее
От: "Carlo Stonebanks"
Дата:
Сообщение: Re: Function scan/Index scan to nested loop