| От | Jason Long |
|---|---|
| Тема | Count for pagination |
| Дата | |
| Msg-id | 1302288171.7116.55.camel@localhost.localdomain обсуждение исходный текст |
| Список | pgsql-general |
The main search screen of my application has pagination. I am basically running 3 queries with the same where clause. 1. Totals for the entire results(not just the number of rows on the first page) a. <300 ms 2. Subset of the total records for one page. a. 1-2 sec 3. Count of the total records for the pagination to show the number of pages a. 1-2 sec The queries are generated by Hibernate and I am looking to rewrite them in native SQL to improve performance. Any suggestions on how to get the count of all records that could be returned and only a subset of those records for that page in an optimized fashion? I have no problem using a widow query or a Postgres specific feature as my app only runs on Postgres.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера