Re: Concatenate performance question

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Concatenate performance question
Дата
Msg-id 21748.1165171060@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Concatenate performance question  ("Michael Guyver" <kenevel@googlemail.com>)
Ответы Re: Concatenate performance question  ("Michael Guyver" <kenevel@googlemail.com>)
Список pgsql-general
"Michael Guyver" <kenevel@googlemail.com> writes:
> ... Running the array_append version is faster by at least one order of
> magnitude in these examples.

Really?  I see only about a 50% advantage (155 msec vs 105 msec) in both
8.1 and 8.2.  What PG version are you running?  What database encoding
are you using?

To a zeroth-order approximation, the two methods should have about the
same amount of data copying involved, and so the concatenation method
ought to win out based on avoiding array data structure manipulation
overhead (not to mention avoiding the array_to_string step, which makes
an extra pass over all the data).  So I find my own results surprising,
and yours very much more so ...

            regards, tom lane

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

Предыдущее
От: Mark Morgan Lloyd
Дата:
Сообщение: Locking for function creation
Следующее
От: "shakahshakah@gmail.com"
Дата:
Сообщение: trouble inserting into new partitions of partitioned tables