From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thomas Kellerer <spam_eater@gmx.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: SELECT very slow
Date: Wed, 08 Jun 2005 20:06:46 -0400
Message-ID: <27961.1118275606@sss.pgh.pa.us> (raw)
In-Reply-To: <d87ood$8vq$1@sea.gmane.org>
References: <d87ood$8vq$1@sea.gmane.org>
Thomas Kellerer <spam_eater@gmx.net> writes:
> Is there anything I can do, to convince PG to return the first row more
> quickly?
libpq's API for PQresult is such that it really doesn't have any choice
but to collect the full result set before it hands you back the
PQresult. I don't know JDBC very well but I think it has similar
semantic constraints.
The solution is to use a cursor and FETCH a reasonably small number of
rows at a time.
regards, tom lane
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-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, spam_eater@gmx.net
Subject: Re: SELECT very slow
In-Reply-To: <27961.1118275606@sss.pgh.pa.us>
* 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