Re: [INTERFACES] JDBC Query performance

From: Peter T Mount <peter(at)retep(dot)org(dot)uk>
To: Postgres mailing lists <postgres(at)weblynk(dot)com>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: [INTERFACES] JDBC Query performance
Date: 1999-03-23 06:48:09
Message-ID: Pine.LNX.4.04.9903230647280.16622-100000@maidast.retep.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

On Mon, 22 Mar 1999, Postgres mailing lists wrote:

> 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.

Ok, if you can send me a table direct to my home address (not the list),
I'll see if I can reproduce it.

Peter

>
> >Hmmm, this is interesting. Does the cpu time match when the same queries
> >are run through PSQL?
> >
> >Peter
> >
> >--
> >Peter T Mount, IT Section
> >petermount(at)it(dot)maidstone(dot)gov(dot)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(at)weblynk(dot)com]
> >Sent: Sunday, March 21, 1999 7:11 PM
> >To: pgsql-interfaces(at)postgreSQL(dot)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.
> >
> >
>

--
Peter T Mount peter(at)retep(dot)org(dot)uk
Main Homepage: http://www.retep.org.uk
PostgreSQL JDBC Faq: http://www.retep.org.uk/postgres
Java PDF Generator: http://www.retep.org.uk/pdf

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Postgres mailing lists 1999-03-23 06:51:26 Re: [INTERFACES] JDBC Query performance
Previous Message Marko Palikko 1999-03-23 00:39:27 Unsubscribe marko@comtechservices.com