Re: [PERFORMANCE] Insights: fseek OR read_cluster?

Поиск
Список
Период
Сортировка
От Marti Raudsepp
Тема Re: [PERFORMANCE] Insights: fseek OR read_cluster?
Дата
Msg-id CABRT9RDEne4S5DWHdL9N+inG7e+PLTFtv78YZ=CEZHSbhUmGxA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PERFORMANCE] Insights: fseek OR read_cluster?  (Antonio Rodriges <antonio.rrz@gmail.com>)
Ответы Re: [PERFORMANCE] Insights: fseek OR read_cluster?  (Antonio Rodriges <antonio.rrz@gmail.com>)
Список pgsql-performance
On Mon, Sep 26, 2011 at 15:51, Antonio Rodriges <antonio.rrz@gmail.com> wrote:
>> What is read_cluster()  ? Are you talking about some kind of async and/or
>
> I meant that if you want to read a chunk of data from file you (1)
> might not call traditional fseek but rather memorize hard drive
> cluster numbers to boost disk seeks and, (2) perform the read of disk
> cluster directly.

PostgreSQL accesses regular files on a file system via lseek(), read()
and write() calls, no magic.

In modern extent-based file systems, mapping a file offset to a
physical disk sector is very fast -- compared to the time of actually
accessing the disk.

I can't see how direct cluster access would even work, unless you'd
give the database direct access to a raw partition, in which case
Postgres would effectively have to implement its own file system. The
gains are simply not worth it for Postgres, our developer resources
are better spent elsewhere.

Regards,
Marti

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Performance Anomaly with "col in (A,B)" vs. "col = A OR col = B" ver. 9.0.3
Следующее
От: "M. D."
Дата:
Сообщение: Re: slow query on tables with new columns added.