Re: [GENERAL] storing C binary array in bytea via libpq

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: [GENERAL] storing C binary array in bytea via libpq
Дата
Msg-id CAHyXU0xQYvuqoEvE=pGcEDQUD7BRSVJn7onhHOLJ+ftDhbyzaw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: storing C binary array in bytea via libpq  (Tom DalPozzo <t.dalpozzo@gmail.com>)
Список pgsql-general
On Wed, Dec 7, 2016 at 4:10 AM, Tom DalPozzo <t.dalpozzo@gmail.com> wrote:
> Hi,
> I tried both ways: they're ok.
> Also, multiple VALUES in one INSERT is actually better as performance.

If you are chasing performance with the binary protocol you might want
to take a look at libpqtypes: http://libpqtypes.esilo.com/

It facilitates fast communication to/from the database.  For
inserting, you stack an array of composites locally and send it to the
database with a single query and the receiving side can unwrap it and
do the insert in a function.   Advancements in json handling have
largely displaced this kind of usage in many situations but if you
have extreme performance requirements it's still worth a look.

merlin


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [GENERAL] Multidimentional array access
Следующее
От: Tom DalPozzo
Дата:
Сообщение: [GENERAL] SELECT slow immediately after many update or delete+insert, exceptusing WHERE .. IN