From: Stephen Crowley <stephen.crowley@gmail.com>
To: pgsql-performance@postgresql.org
Subject: Re: Large # of rows in query extremely slow, not using index
Date: Mon, 13 Sep 2004 20:22:19 -0500
Message-ID: <3f71fdf104091318228099815@mail.gmail.com> (raw)
In-Reply-To: <28088.1095124267@sss.pgh.pa.us>
References: <3f71fdf104091317515c756512@mail.gmail.com>
<28088.1095124267@sss.pgh.pa.us>
On Mon, 13 Sep 2004 21:11:07 -0400, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Stephen Crowley <stephen.crowley@gmail.com> writes:
> > Does postgres cache the entire result set before it begins returning
> > data to the client?
>
> The backend doesn't, but libpq does, and I think JDBC does too.
>
> I'd recommend using a cursor so you can FETCH a reasonable number of
> rows at a time.
That is incredible. Why would libpq do such a thing? JDBC as well? I
know oracle doesn't do anything like that, not sure about mysql. Is
there any way to turn it off? In this case I was just using psql but
will be using JDBC for the app. About cursors, I thought a jdbc
ResultSet WAS a cursor, am I mistaken?
Thanks,
Stephen
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-performance@postgresql.org
Cc: stephen.crowley@gmail.com
Subject: Re: Large # of rows in query extremely slow, not using index
In-Reply-To: <3f71fdf104091318228099815@mail.gmail.com>
* 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