Re: Bug: Buffer cache is not scan resistant

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: Bug: Buffer cache is not scan resistant
Дата
Msg-id 1173125991.13722.327.camel@dogma.v10.wvs
обсуждение исходный текст
Ответ на Re: Bug: Buffer cache is not scan resistant  (Heikki Linnakangas <heikki@enterprisedb.com>)
Ответы Re: Bug: Buffer cache is not scan resistant  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Mon, 2007-03-05 at 09:09 +0000, Heikki Linnakangas wrote:
> In fact, the pages that are left in the cache after the seqscan finishes 
> would be useful for the next seqscan of the same table if we were smart 
> enough to read those pages first. That'd make a big difference for 
> seqscanning a table that's say 1.5x your RAM size. Hmm, I wonder if 
> Jeff's sync seqscan patch adresses that.
> 

Absolutely. I've got a parameter in my patch "sync_scan_offset" that
starts a seq scan N pages before the position of the last seq scan
running on that table (or a current seq scan if there's still a scan
going). 

If the last scan is not still in progress, the pages are less likely to
be in cache. If the pages are in cache, great; if not, it doesn't matter
where we start anyway.

If the last scan is still in progress, those recently-read pages are
very likely to be in cache (shared buffers or OS buffer cache).

Regards,Jeff Davis



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Bug: Buffer cache is not scan resistant
Следующее
От: Tom Lane
Дата:
Сообщение: Re: proposal: custom variables management