Varchar and binary protocol

Поиск
Список
Период
Сортировка
От Radosław Smogura
Тема Varchar and binary protocol
Дата
Msg-id 201102052259.45385.rsmogura@softperience.eu
обсуждение исходный текст
Ответы Re: Varchar and binary protocol  (Noah Misch <noah@leadboat.com>)
Re: Varchar and binary protocol  (Merlin Moncure <mmoncure@gmail.com>)
Список pgsql-hackers
Hi,

I do performance tests against orignal JDBC driver and my version in binary 
and in text mode. I saw strange results when I was reading varchar values.
Here is some output from simple benchmark

Plain strings speed   Execution: 8316582        , local: 2116608        , all: 
10433190
Binary strings speed  Execution: 9354613        , local: 2755949        , all: 
12110562
Text NG strings speed Execution: 8346902        , local: 2704242        , all: 
11051144

Plain is standard JDBC driver, Binary is my version with binary transfer, Text 
is my version with normal transfer. 1st column, "Execution" is time spend on 
query execution this includes send, recivie proto message, store it, etc, no 
conversion to output format. Values are in nanoseconds.

In new version I added some functionality, but routines to read parts in 
"Execution" block are almost same for binary and text.

But as you see the binary version is 10-20% slower then orginal, and my text 
version, if I increase number of read records this proportion will not change. 
I done many checks, against even "skip proto message content" driver, end 
results was same 10-20% slower.

Regards,
Radek.


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: limiting hint bit I/O
Следующее
От: Cédric Villemain
Дата:
Сообщение: Re: limiting hint bit I/O