On 09.06.2005 02:06 Tom Lane wrote:
> Thomas Kellerer <spam_eater@gmx.net> writes:
>
>>Is there anything I can do, to convince PG to return the first row more
>>quickly?
>
> The solution is to use a cursor and FETCH a reasonably small number of
> rows at a time.
Thanks for all your answers.
I turned out that I did not read the JDBC documentation closely enough (blush)
Setting the fetchSize to 1 (or something >0) only uses a cursor if autocommit is
disabled (due to the annoying "transaction is aborted" when running DDL scripts
that have errors, I usually turn autocommit on).
With autocommit off, the rows will be returned "immediately" (so the driver is
using a cursor to fetch the data)
Regards
Thomas