Re: Takes too long to fetch the data from database

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: Takes too long to fetch the data from database
Дата
Msg-id 20060421174149.GA13275@wolff.to
обсуждение исходный текст
Ответ на Re: Takes too long to fetch the data from database  ("soni de" <soni.de@gmail.com>)
Список pgsql-performance
On Fri, Apr 21, 2006 at 10:12:24 +0530,
  soni de <soni.de@gmail.com> wrote:
> I don't want to query exactly 81900 rows into set. I just want to fetch 50
> or 100 rows at a time in a decreasing order of stime.(i.e 50 or 100 rows
> starting from last to end).

You can do this efficiently, if stime has an index and you can deal with using
stime from the previous query instead of the record count. The idea is to
select up 50 or 100 records in descending order where the stime is <=
the previous stime. This can give you some overlapping records, so you need
some way to deal with this.

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Inactive memory Grows unlimited
Следующее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: Takes too long to fetch the data from database