Re: Slow statement when using JDBC

From: David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Slow statement when using JDBC
Date: 2014-07-21 05:32:08
Message-ID: 1405920728079-5812174.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-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.

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Albe Laurenz 2014-07-21 07:52:34 Re: JBDC LDAP support
Previous Message arunkmp 2014-07-21 05:06:38 Re: Slow statement when using JDBC