Re: Advice Wanted on Selecting Multi-row Data Requests in 10-Row Blocks

Поиск
Список
Период
Сортировка
От Olexandr Melnyk
Тема Re: Advice Wanted on Selecting Multi-row Data Requests in 10-Row Blocks
Дата
Msg-id d5f60f0c0806271329w5bc10c0ay75c17bc57c1004b0@mail.gmail.com
обсуждение исходный текст
Ответ на Advice Wanted on Selecting Multi-row Data Requests in 10-Row Blocks  (Bill Thoen <bthoen@gisnet.com>)
Ответы Re: Advice Wanted on Selecting Multi-row Data Requests in 10-Row Blocks  (Bill Thoen <bthoen@gisnet.com>)
Список pgsql-general
On 6/27/08, Bill Thoen <bthoen@gisnet.com> wrote:
What I want to do is present the results of a query in a web page, but only 10 rows at a time. My PostgreSQL table has millions of records and if I don't add a LIMIT 10 to the SQL selection, the request can take too long. The worst case scenario is when the user requests all records without adding filtering conditions (e.g. SELECT * FROM MyTable;)  That can take 10-15 minutes, which won't work on a web application.


Also note, that huge OFFSET value can slow down the query as much as if you weren't using LIMIT at all.

--
Sincerely yours,
Olexandr Melnyk <><
http://omelnyk.net/

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

Предыдущее
От: Lennin Caro
Дата:
Сообщение: Re: Advice Wanted on Selecting Multi-row Data Requests in 10-Row Blocks
Следующее
От: Ragnar
Дата:
Сообщение: Re: Advice Wanted on Selecting Multi-row Data Requests in 10-Row Blocks