| From: | Thomas Kellerer <spam_eater(at)gmx(dot)net> |
|---|---|
| To: | pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: SELECT very slow |
| Date: | 2005-06-09 06:58:51 |
| Message-ID: | d88p3j$mb8$2@sea.gmane.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
On 09.06.2005 02:06 Tom Lane wrote:
> Thomas Kellerer <spam_eater(at)gmx(dot)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.
>
My understanding was that setting the fetchSize() to 1 in JDBC would force the
use of a cursor.
I'll have to go through the JDBC docs again to check how I can enforce this.
Thanks for the answer though
Thomas
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Kenneth Gonsalves | 2005-06-09 07:06:31 | rejecting characters in a field |
| Previous Message | Thomas Kellerer | 2005-06-09 06:56:54 | Re: SELECT very slow |