X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 0099A9FA2CB for ; Wed, 10 May 2006 18:09:02 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 34423-02 for ; Wed, 10 May 2006 18:08:52 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from globalrelay.com (mail1.globalrelay.com [216.18.71.77]) by postgresql.org (Postfix) with ESMTP id AD6249FA293 for ; Wed, 10 May 2006 18:08:50 -0300 (ADT) X-Virus-Scanned: Scanned by GRC-AntiVirus Gateway X-GR-Acctd: YES Received: from [67.90.96.2] (HELO DaveEMachine) by globalrelay.com (CommuniGate Pro SMTP 4.2.3) with ESMTP id 89956650; Wed, 10 May 2006 14:08:49 -0700 From: "Dave Dutcher" To: "'Thomas Vatter'" Cc: Subject: Re: in memory views Date: Wed, 10 May 2006 16:08:49 -0500 Message-ID: <01fd01c67475$ef17d530$8300a8c0@tridecap.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_01FE_01C6744C.0641CD30" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 In-reply-to: <446252E8.8000304@network-inventory.de> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/273 X-Sequence-Number: 19060 This is a multi-part message in MIME format. ------=_NextPart_000_01FE_01C6744C.0641CD30 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Are you using the Postgres JDBC driver? Or are you using an ODBC JDBC driver? The Postgres specific driver is usually faster. -----Original Message----- From: pgsql-performance-owner@postgresql.org [mailto:pgsql-performance-owner@postgresql.org] On Behalf Of Thomas Vatter Sent: Wednesday, May 10, 2006 3:54 PM To: Scott Marlowe Cc: Tino Wildenhain; pgsql-performance@postgresql.org Subject: Re: [PERFORM] in memory views Scott Marlowe wrote: On Wed, 2006-05-10 at 10:41, Thomas Vatter wrote: Scott Marlowe wrote: What happens if you do this by declaring it as a cursor and then fetching the first row? I do executeQuery(), for the resultSet I do next() and return one row, but wait, I have to review the logic in this area, I can tell you tomorrow A good short test is to run explain analyze on the query from the psql command line. If it shows an execution time of significantly less than what you get from you application, then it is likely that the real problem is that your application is receiving the whole result set via libpq and waiting for that. A cursor will solve that problem. ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org Yes, the difference between psql command line and application is 6 seconds to 40 seconds. It is exactly the step resultSet = excecuteQuery() that needs 40 seconds. I use next() as a cursor through the resultSet, but I fear this is not enough, do I have to use createStatement(resultSetType, resultSetConcurrency) respectively prepareStatement (resultSetType, resultSetConcurrency) to achieve the cursor behaviour? regards tom ------=_NextPart_000_01FE_01C6744C.0641CD30 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Message
Are=20 you using the Postgres JDBC driver?  Or are you using an ODBC JDBC=20 driver?  The Postgres specific driver is usually=20 faster.
 
 
-----Original Message-----
From:=20 pgsql-performance-owner@postgresql.org=20 [mailto:pgsql-performance-owner@postgresql.org] On Behalf Of = Thomas=20 Vatter
Sent: Wednesday, May 10, 2006 3:54 PM
To: = Scott=20 Marlowe
Cc: Tino Wildenhain;=20 pgsql-performance@postgresql.org
Subject: Re: [PERFORM] in = memory=20 views

Scott Marlowe wrote:=20
On Wed, 2006-05-10 at 10:41, Thomas =
Vatter wrote:
  
Scott Marlowe wrote:=20
    

  
What happens if you do =
this by declaring it as a cursor and then
fetching the first row?
      

  
 =20
      
I do executeQuery(), for the =
resultSet I do next() and return one row,
but wait, I have to review the logic in this area, I can tell you
tomorrow
    


A good short test is to run explain analyze on the query from the psql
command line.  If it shows an execution time of significantly less than
what you get from you application, then it is likely that the real
problem is that your application is receiving the whole result set via
libpq and waiting for that.  A cursor will solve that problem.

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org


  
Yes, the difference between psql command line and=20 application is 6 seconds to 40 seconds. It is
exactly the step = resultSet =3D=20 excecuteQuery() that needs 40 seconds. I use next() as a = cursor
through the=20 resultSet, but I fear this is not enough, do I have to use=20 createStatement(resultSetType,
resultSetConcurrency) respectively=20 prepareStatement (resultSetType, resultSetConcurrency) to
achieve = the=20 cursor = behaviour?

regards
tom

------=_NextPart_000_01FE_01C6744C.0641CD30--