Re: Slowness of extended protocol - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject Re: Slowness of extended protocol
Date
Msg-id 20160819.150241.1712095925015012241.t-ishii@sraoss.co.jp
Whole thread Raw
In response to Re: Slowness of extended protocol  (Tatsuo Ishii <ishii@sraoss.co.jp>)
Responses Re: Slowness of extended protocol  (Vladimir Sitnikov <sitnikov.vladimir@gmail.com>)
List pgsql-hackers
BTW, there seem to be a room to enhance JDBC driver performance. In my
understanding it always uses unnamed portal even if the SQL is like
"BEGIN" or "COMMIT" (no parameters). They are too often used. Why not
doing like this?

Prepare(stmt=S1,query="BEGIN")
Bind(stmt=S1,portal=P1)
Execute(portal=P1)
:
:
Execute(portal=P1)
:
:
Execute(portal=P1)

Instead of:

Prepare(stmt=S1,query="BEGIN")
Bind(stmt=S1,portal=null)
Execute(portal=null)
:
:
Bind(stmt=s1,portal=null)
Execute(portal=null)
:
:
Bind(stmt=s1,portal=null)
Execute(portal=null)

This way, we could save bunch of Bind messages.

I don't know what other drivers do though.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp



pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: pg_basebackup wish list
Next
From: Alexander Korotkov
Date:
Subject: Should we cacheline align PGXACT?