Re: [PERFORM] A Better External Sort?

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: [PERFORM] A Better External Sort?
Дата
Msg-id 20051001161936.GE13830@svana.org
обсуждение исходный текст
Ответ на Re: [PERFORM] A Better External Sort?  (Ron Peacetree <rjpeace@earthlink.net>)
Ответы Re: [PERFORM] A Better External Sort?  (Michael Stone <mstone+postgres@mathom.us>)
Список pgsql-hackers
On Sat, Oct 01, 2005 at 10:22:40AM -0400, Ron Peacetree wrote:
> Assuming we get the abyssmal physical IO performance fixed...
> (because until we do, _nothing_ is going to help us as much)

I'm still not convinced this is the major problem. For example, in my
totally unscientific tests on an oldish machine I have here:

Direct filesystem copy to /dev/null
21MB/s    10% user 50% system  (dual cpu, so the system is using a whole CPU)

COPY TO /dev/null WITH binary
13MB/s    55% user 45% system  (ergo, CPU bound)

COPY TO /dev/null
4.4MB/s   60% user 40% system

\copy to /dev/null in psql
6.5MB/s   60% user 40% system

This machine is a bit strange setup, not sure why fs copy is so slow.
As to why \copy is faster than COPY, I have no idea, but it is
repeatable. And actually turning the tuples into a printable format is
the most expensive. But it does point out that the whole process is
probably CPU bound more than anything else.

So, I don't think physical I/O is the problem. It's something further
up the call tree. I wouldn't be surprised at all it it had to do with
the creation and destruction of tuples. The cost of comparing tuples
should not be underestimated.
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

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

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: [PERFORM] A Better External Sort?
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: effective SELECT from child tables