Received: from trends.net (root@clio.trends.ca [209.47.148.2]) by hub.org (8.9.2/8.9.1) with ESMTP id EAA03204 for ; Wed, 24 Mar 1999 04:06:03 -0500 (EST) (envelope-from postgres@weblynk.com) Received: from weblynk.com ([209.85.101.4]) by trends.net (8.8.8/8.8.8) with SMTP id BAA05253 for ; Tue, 23 Mar 1999 01:33:30 -0500 (EST) Received: from doggy (pool471-cvx.ds39-ca-us.dialup.earthlink.net [209.179.48.121]) by weblynk.com (8.6.12/8.6.9) with SMTP id WAA11191; Mon, 22 Mar 1999 22:37:24 -0800 Message-ID: <003b01be74f9$942eb400$64ba01cc@earthlink.net> From: "Postgres mailing lists" To: Cc: "Peter Mount (Home)" Subject: Re: [INTERFACES] JDBC Query performance Date: Mon, 22 Mar 1999 22:51:26 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.0810.800 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.0810.800 That's what's interesting about this to me. Using psql, piping the results to a file, it is less than a second, and the CPU time goes to 50% idle. The file that I piped to ends up about 3.5MB's. Jdbc is about 90 seconds, and 0% idle. I've put trace statements in, so I'm pretty sure that to return from the executeQuery(sql); method is about 90 seconds. If you can't reproduce it, then maybe I could send you the table that I query, or maybe you could send me a table that you query of similiar size (~1200 rows, 25 columns, no indexes, most columns are varchar() or float8() ), that it performs well on. Rich. >Hmmm, this is interesting. Does the cpu time match when the same queries >are run through PSQL? > >Peter > >-- >Peter T Mount, IT Section >petermount@it.maidstone.gov.uk >Anything I write here are my own views, and cannot be taken as the >official words of Maidstone Borough Council > >-----Original Message----- >From: Postgres mailing lists [mailto:postgres@weblynk.com] >Sent: Sunday, March 21, 1999 7:11 PM >To: pgsql-interfaces@postgreSQL.org >Subject: Re: [INTERFACES] JDBC Query performance > > >>At 11:07 +0200 on 18/03/1999, Peter Mount wrote: >> >> >>> >>> The delay is because the driver currently retrieves the entire result >>> into a Vector() before returning the ResultSet. >> >>Couldn't it also be because of Java's usage of network sockets compared >to >>psql's use of unix sockets? >> >You know, I also noticed that it is the postgres back-end process which >is >using all the CPU time during the query. Doesn't sound like Vector >operations to me, which should cause the java process to eat all the CPU >time. >Rich. > >