Re: bytea vs. pg_dump

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: bytea vs. pg_dump
Дата
Msg-id 4725.1241619571@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: bytea vs. pg_dump  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> Bernd Helmle wrote:
>> I'm dumb: I don't understand why a hex conversion would be 
>> significantly faster than what we have now?

> Quite apart from anything else you would not need the current loop over 
> the bytea input to calculate the result length - in hex it would just be 
> the input length * 2.

Another point is that the current format results in a very large number
of backslashes in the output data, which translates to extra time and
space at the level of the COPY protocol itself (since that has to double
all those backslashes).

Of course, base64 would also have these two advantages.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Patch to fix search_path defencies with pg_bench
Следующее
От: Andrew Chernow
Дата:
Сообщение: Re: bytea vs. pg_dump