Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1X96Cu-0003Pv-Dk for pgsql-jdbc@arkaria.postgresql.org; Mon, 21 Jul 2014 05:32:16 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1X96Ct-00038l-G7 for pgsql-jdbc@arkaria.postgresql.org; Mon, 21 Jul 2014 05:32:15 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1X96Cs-00038e-Iq for pgsql-jdbc@postgresql.org; Mon, 21 Jul 2014 05:32:14 +0000 Received: from sam.nabble.com ([216.139.236.26]) by magus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1X96Co-000435-HC for pgsql-jdbc@postgresql.org; Mon, 21 Jul 2014 05:32:13 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1X96Cm-00078I-2k for pgsql-jdbc@postgresql.org; Sun, 20 Jul 2014 22:32:08 -0700 Date: Sun, 20 Jul 2014 22:32:08 -0700 (PDT) From: David G Johnston To: pgsql-jdbc@postgresql.org Message-ID: <1405920728079-5812174.post@n5.nabble.com> In-Reply-To: <1405919198334-5812163.post@n5.nabble.com> References: <1375209154731-5765663.post@n5.nabble.com> <1405919198334-5812163.post@n5.nabble.com> Subject: Re: Slow statement when using JDBC MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: 0.8 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org 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