Re: [HACKERS] SendRowDescriptionMessage() is slow for queries with alot of columns

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: [HACKERS] SendRowDescriptionMessage() is slow for queries with alot of columns
Дата
Msg-id 20171011184753.gdvxfjdeihrghrsi@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: [HACKERS] SendRowDescriptionMessage() is slow for queries with alot of columns  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Ответы Re: [HACKERS] SendRowDescriptionMessage() is slow for queries with alot of columns  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Hi,

On 2017-10-11 18:05:32 +0200, Alvaro Herrera wrote:
> Well, my concern is to ensure that extension authors take advantage of
> the optimized implementation.  If we never let them know that we've
> rewritten things, most are not going to realize they can make their
> extensions faster with a very simple code change.

The inline pq_gsendint() already results in faster code in a good
number of cases, as a decent compiler will often be able to evaluate at
plan time.


> On the other hand, I suppose that for the vast majority of extensions,
> doing the change is unlikely to have a noticeable in performance, so
> perhaps we should just keep the shim and move along.

Yea, I think it's unlikely to be noticeable unless you do a lot of them
in a row. Unfortunately all send functions essentially allocate a new
StringInfo - which is going to dominate execution cost.  We literally
allocate 1kb to send a single four byte integer.

Fixing the output function performance requires a fairly different type
of patch imo.


> If do nothing, it's unlikely we'd ever get rid of the compat function.

I think that's ok.

Greetings,

Andres Freund


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] Proposal: Local indexes for partitioned table
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] SendRowDescriptionMessage() is slow for queries with alot of columns