Re: COUNT & Pagination
| От | Jeff Fitzmyers |
|---|---|
| Тема | Re: COUNT & Pagination |
| Дата | |
| Msg-id | 107436B6-4479-11D8-BE00-000A959C6000@cloverpub.com обсуждение исходный текст |
| Ответ на | COUNT & Pagination (David Shadovitz <david@shadovitz.com>) |
| Список | pgsql-performance |
> So I'm looking for advice on displaying paginated query results. > Displaying 1 to 50 of 2905. > 1-50 | 51-100 | 101-150 | etc. > > I do this by executing two queries. One is of the form: > SELECT <select list> FROM <view/table list> WHERE <filter> LIMIT m > OFFSET n > The other is identical except that I replace the select list with > COUNT(*). This is the only way I know of how to do it. > I'm running PG 7.2.2 and want to upgrade to 7.4.1. I've never > upgraded PG > before and I'm nervous. Can I simply run pg_dumpall, install 7.4.1, > and then > feed the dump into psql? I would practice and play with it on another machine until you can do it easily. You will learn a lot and the experience might prove invaluable in may ways :-) Jeff
В списке pgsql-performance по дате отправления: