Re: SELECT very slow - Mailing list pgsql-sql

From Tom Lane
Subject Re: SELECT very slow
Date
Msg-id 27961.1118275606@sss.pgh.pa.us
Whole thread Raw
In response to SELECT very slow  (Thomas Kellerer <spam_eater@gmx.net>)
Responses Re: SELECT very slow
Re: SELECT very slow
Re: SELECT very slow
List pgsql-sql
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


pgsql-sql by date:

Previous
From: Keith Worthington
Date:
Subject: [Fwd: RE: Re: Rule]
Next
From: Alain
Date:
Subject: Re: SELECT very slow