Binary binding patch v1

Поиск
Список
Период
Сортировка
От Mikko Tiihonen
Тема Binary binding patch v1
Дата
Msg-id 1166384857.6923.30.camel@dual.local
обсуждение исходный текст
Список pgsql-jdbc
Hi,

It seems I found nothing better to do... So here is the first patch that
allows using of binary transfers for bind data. The patch must be
applied on top of the binaryResultSet-v6.patch.

The old code supported binary transfers only for BYTEA type. Now also
INT2, INT4, INT8, FLOAT4 and FLOAT8 are supported. The patch is actually
quite simple, but testing for performance improvements is harder than
for selects because the backend settings have larger effect on the
result.
My current results show around 5-10% speedup and 20-30% memory use
reduction, measured from the test code.

I started working on DATE/TIME/TIMEZONE binary sending too, but I'm
afraid it might not be possible. At least based on the long comments
describing problems with the current text format sending which requires
the use of UNSPECIFIED oid. I did actually get DATE to work by sending
it as Oid.DATE. But since the java.sql.Date actually contains also the
time part I'm not sure if it should be sent using Oid.TIMESTAMP.
Actually I think if binary sending of time/date is ever done it most
likely should always use TIMESTAMPTZ format and then let the backend
do the conversion to correct type. But as the comments in the jdbc
driver show the backend seems a bit buggy in this regard.

-Mikko

Вложения

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

Предыдущее
От: Dave Cramer
Дата:
Сообщение: Re: Efficient Insert statement for one record into multiple
Следующее
От: "Jason Bennett"
Дата:
Сообщение: Ant tag for dollar quoting