Re: how to handle Pagination >

Поиск
Список
Период
Сортировка
От jesusthefrog
Тема Re: how to handle Pagination >
Дата
Msg-id CAH_wARvFGFxoxdnXc5FP=qeZuAh+Azi_yGs1VG0NabGXc+Picw@mail.gmail.com
обсуждение исходный текст
Ответ на how to handle Pagination >  (Madhavan <vbtamil@zoho.com>)
Ответы Re: how to handle Pagination >  (Vik Fearing <vik.fearing@dalibo.com>)
Re: how to handle Pagination >  (Kevin Hunter Kesling <kmhunte2@ncsu.edu>)
Список pgsql-novice
You will probably want to use OFFSET and LIMIT, which are the window size and page. Something like

SELECT .. FROM ... WHERE ... ORDER BY (...) OFFSET y LIMIT x

So say you want to get 100 records at a time. You would get page 1 with OFFSET 0 LIMIT 100, then page 2 with OFFSET 100, OFFSET 200, and so on.

That's just off the top of my head. There may be another solution which will work better in your case, but lacking details, this is what I would recommend.

--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GIT d+ s: a-- C++++(++) UL+++ P++++$ L+++>++++ E- W+ N o? K w--- O-
M- V? PS+++ PE(-) Y+ PGP->+++ t+>++ 5+++++ X(+) R>+ tv b+
DI++ D++>+++ G+ e* h! !r y**
------END GEEK CODE BLOCK------

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

Предыдущее
От: Madhavan
Дата:
Сообщение: how to handle Pagination >
Следующее
От: Vik Fearing
Дата:
Сообщение: Re: how to handle Pagination >