Re: binary representation of datatypes

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: binary representation of datatypes
Дата
Msg-id b42b73150810220518vb1f02eeh1f696bf60e35e935@mail.gmail.com
обсуждение исходный текст
Ответ на Re: binary representation of datatypes  (Andrew Chernow <ac@esilo.com>)
Список pgsql-hackers
On Wed, Oct 22, 2008 at 8:07 AM, Andrew Chernow <ac@esilo.com> wrote:
>>> You mean that when results are asked in textual representation (the
>>> default), data is sent on network directly as text?
>>
>> You should know that text/binary conversions rarely play a significant
>> role in terms of performance.  There are exceptions...large bytea
>> columns, or enormous sets of integers.  This is coming from a guy that
>> co-wrote a library that allows you to pull data directly in binary.
>>
>> merlin
>>
>
> If I remember correctly, composites and composite arrays also show worth
> while performance gains.  libpq array and composite handling is what
> initially spawned the libpqtypes project (which required providing type
> handling for every basic type like int and text).  So, different types were
> implemented for different reasons, it was not all performance.  The ultimate
> functionality we were looking for was multiple result sets, which composite
> arrays solve nicely.

sure. That isn't, strictly speaking, a performance argument...it's
also a convenience thing.
You won't see a difference either way unless the arrays are large, or
a lot of them (big result sets).  For smaller result sets, the
overhead of executing the query is where all the time is spent.

merlin


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

Предыдущее
От: Andrew Chernow
Дата:
Сообщение: Re: binary representation of datatypes
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Bitmap Indexes: request for feedback