pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Simon Hardingham <simon@netxtra.net>
To: pgsql-interfaces@postgresql.org
Subject: JDBC - speed with big 'select's
Date: Mon, 6 Dec 1999 14:34:56 -0000
Message-ID: <2DB2D9CD27AED211894500A0C92A02ED148FEE@sauron.netxtra.net> (raw)

Hi,

Having just read the results of the post concerning INSERT times, I thought
I should ask a related question that has been causing me some problems.

I have a servlet which performs a SELECT which returns up to 6000 rows.
These contain just 6 ints and need to be read to perform a specialised
search.  The query run's pretty quick, less than a second (although the time
to display is much longer), using the psql interface. Therefore I assume the
majority of the time the servlet requires is repeated calls to rs.next() and
then the requests for each of the fields across the socket connection.

JDBC 2.0 has a setFetchSize() function which looks as though it may allow me
to transfer the results in larger chunks, but I am shooting in the dark
really.

Any suggestions as how I might speed this whole thing up, the INSERT trick
by using COPY FROM STDIN got me thinking there may be other alternatives.
Unfortunately I can not perform the selection using a more selective SELECT
statement.

Many thanks in advance

Simon

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/         Simon Hardingham - netXtra Ltd - UK          _/
_/ Tel: +44 (0) 1787 319393    Fax: +44 (0) 1787 319394 _/
_/ http://www.netxtra.co.uk         simon@netxtra.co.uk _/
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/




view thread (2+ messages)  latest in thread

Message-ID: <2DB2D9CD27AED211894500A0C92A02ED148FEE@sauron.netxtra.net>
Permalink:  ../2DB2D9CD27AED211894500A0C92A02ED148FEE@sauron.netxtra.net/
Also on:    postgresql.org/message-id/2DB2D9CD27AED211894500A0C92A02ED148FEE@sauron.netxtra.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: simon@netxtra.net
  Subject: Re: JDBC - speed with big 'select's
  In-Reply-To: <2DB2D9CD27AED211894500A0C92A02ED148FEE@sauron.netxtra.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox