Skip site navigation (1) Skip section navigation (2)

Re: Large # of rows in query extremely slow, not using index

From: Stephen Crowley <stephen(dot)crowley(at)gmail(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Large # of rows in query extremely slow, not using index
Date: 2004-09-14 01:22:19
Message-ID: 3f71fdf104091318228099815@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-performance
On Mon, 13 Sep 2004 21:11:07 -0400, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Stephen Crowley <stephen(dot)crowley(at)gmail(dot)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

In response to

Responses

pgsql-performance by date

Next:From: Bruce MomjianDate: 2004-09-14 01:28:09
Subject: Re: Determine optimal fdatasync/fsync, O_SYNC/O_DSYNC options
Previous:From: Rod TaylorDate: 2004-09-14 01:11:13
Subject: Re: Large # of rows in query extremely slow, not using

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group