From: | Vik Fearing <vik(dot)fearing(at)dalibo(dot)com> |
---|---|
To: | jesusthefrog <jesusthefrog(at)gmail(dot)com>, Madhavan <vbtamil(at)zoho(dot)com> |
Cc: | "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: how to handle Pagination > |
Date: | 2013-10-15 16:54:43 |
Message-ID: | 525D7353.5000005@dalibo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
On 10/15/2013 05:01 PM, jesusthefrog wrote:
> 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.
You will most certainly NOT want to use that technique.
Instead, try these links:
https://wiki.postgresql.org/wiki/File:Pagination_Done_the_PostgreSQL_Way.pdf
http://microjet.ath.cx/WebWiki/ResultPaginationWithPostgresql.html
https://coderwall.com/p/lkcaag
http://www.depesz.com/2007/08/29/better-results-paging-in-postgresql-82/
--
Vik
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Hunter Kesling | 2013-10-15 17:02:06 | Re: how to handle Pagination > |
Previous Message | jesusthefrog | 2013-10-15 15:01:33 | Re: how to handle Pagination > |