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

Поиск
Список
Период
Сортировка
От Stephen Crowley
Тема Re: Large # of rows in query extremely slow, not using index
Дата
Msg-id 3f71fdf104091318228099815@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Large # of rows in query extremely slow, not using index  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Large # of rows in query extremely slow, not using index  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
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

В списке pgsql-performance по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Large # of rows in query extremely slow, not using index
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Determine optimal fdatasync/fsync, O_SYNC/O_DSYNC options