From: David G Johnston <david.g.johnston@gmail.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: Slow statement when using JDBC
Date: Sun, 20 Jul 2014 22:32:08 -0700 (PDT)
Message-ID: <1405920728079-5812174.post@n5.nabble.com> (raw)
In-Reply-To: <1405919198334-5812163.post@n5.nabble.com>
References: <AANLkTik_Ww_gGcNF2ntN0Emq5_KGvLN2WSDnC4BQiSTC@mail.gmail.com>
<AANLkTik5eqiMj-GZDahLJ1HiL==xfQGxp-wZbxJwnBws@mail.gmail.com>
<AANLkTimSzT6JkWkxJwNpWhSNLbcxaymREFHf3vAoYZTX@mail.gmail.com>
<1375209154731-5765663.post@n5.nabble.com>
<1405919198334-5812163.post@n5.nabble.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>
arunkmp wrote
> i tested same query in php using pear-Db connectivity its nomally 2 times
> faster than java conntivity.
>
> for both my postgresql version 9.1,
>
> can anyone explain me why its speeder in php.
Given that the reason for the poor JDBC performance has been explained this
likely isn't the best list to get answers as to why PHP doesn't seem to
exhibit the same problem...
It would probably also help to supply actual code since your use of the two
libraries could be a contributing factor.
And the versions of the drivers would also be good information to supply...
PHP is possibly bypassing the whole "prepare" aspect and simply providing
what appears to be a prepared statement interface while actually sending
complete queries, without parameters, to the database. This would explain
the difference but is truly a guess since I have not used Pear/PHP.
David J.
--
View this message in context: http://postgresql.1045698.n5.nabble.com/Slow-statement-when-using-JDBC-tp3368379p5812174.html
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.
--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: david.g.johnston@gmail.com
Subject: Re: Slow statement when using JDBC
In-Reply-To: <1405920728079-5812174.post@n5.nabble.com>
References: <AANLkTik_Ww_gGcNF2ntN0Emq5_KGvLN2WSDnC4BQiSTC@mail.gmail.com> <AANLkTik5eqiMj-GZDahLJ1HiL==xfQGxp-wZbxJwnBws@mail.gmail.com> <AANLkTimSzT6JkWkxJwNpWhSNLbcxaymREFHf3vAoYZTX@mail.gmail.com> <1375209154731-5765663.post@n5.nabble.com> <1405919198334-5812163.post@n5.nabble.com> <1405920728079-5812174.post@n5.nabble.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox