Re: BUG #17896: xmlagg exponentially slower than string_agg equivalent

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #17896: xmlagg exponentially slower than string_agg equivalent
Дата
Msg-id 1701648.1681569942@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #17896: xmlagg exponentially slower than string_agg equivalent  (PG Bug reporting form <noreply@postgresql.org>)
Список pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> Also, while string_agg() seems to scale linearly (O(n)), xmlagg() seems to
> scale somewhat steeper (O(n^2)?).

Yeah, string_agg was optimized long ago to avoid repeat data copying,
but xmlagg hasn't been.

It looks like xmlagg doesn't make any direct use of libxml, which suggests
that this wouldn't be terribly hard to fix if somebody were motivated
to try.  The xml type is a bit of a development backwater though ...

            regards, tom lane



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

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #17898: Build failure when strip is LLVM's version
Следующее
От: Dmitry Dolgov
Дата:
Сообщение: Re: BUG #17897: Crash on assignment to array of constraint-less domain over composite type