Re: There's random access and then there's random access

Поиск
Список
Период
Сортировка
От Decibel!
Тема Re: There's random access and then there's random access
Дата
Msg-id 20071205234742.GX59974@decibel.org
обсуждение исходный текст
Ответ на Re: There's random access and then there's random access  (Gregory Stark <stark@enterprisedb.com>)
Список pgsql-hackers
On Wed, Dec 05, 2007 at 01:49:20AM +0000, Gregory Stark wrote:
> Regardless of what mechanism is used and who is responsible for doing it
> someone is going to have to figure out which blocks are specifically
> interesting to prefetch. Bitmap index scans happen to be the easiest since
> we've already built up a list of blocks we plan to read. Somehow that
> information has to be pushed to the storage manager to be acted upon.
>
> Normal index scans are an even more interesting case but I'm not sure how hard
> it would be to get that information. It may only be convenient to get the
> blocks from the last leaf page we looked at, for example.

I guess it depends on how you're looking at things... I'm thinking more
in terms of telling the OS to fetch stuff we're pretty sure we're going
to need while we get on with other work. There's a lot of cases where
you know that besides just a bitmap scan (though perhaps code-wise
bitmap scan is easier to implement...)

For a seqscan, we'd want to be reading some number of blocks ahead of
where we're at right now.

Ditto for index pages on an index scan. In addition, when we're scanning
the index, we'd definitely want to issue heap page requests
asynchronously, since that gives the filesystem, etc a better shot at
re-ordering the reads to improve performance.
--
Decibel!, aka Jim C. Nasby, Database Architect  decibel@decibel.org
Give your computer some brain candy! www.distributed.net Team #1828

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

Предыдущее
От: Decibel!
Дата:
Сообщение: Re: Truncate Triggers
Следующее
От: Decibel!
Дата:
Сообщение: Re: Spoofing as the postmaster