| От | Ragnar Hafstað |
|---|---|
| Тема | Re: getting count for a specific querry |
| Дата | |
| Msg-id | 1112979349.7447.42.camel@localhost.localdomain обсуждение исходный текст |
| Ответ на | Re: getting count for a specific querry (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-sql |
On Fri, 2005-04-08 at 12:32 -0400, Tom Lane wrote: > Ragnar Hafstað <gnari@simnet.is> writes: > > you might reduce the performance loss if your dataset is ordered by > > a UNIQUE index. > > > select * from mytable where somecondition > > ORDER by uniquecol limit 50; > > > and next: > > > select * from mytable where somecondition AND uniquecol>? > > ORDER by uniquecol limit 50 OFFSET 50; > > > where the ? is placeholder for last value returned by last query. > > Uh, you don't want the OFFSET there do you? ooops! of course not. the uniquecol>? is meant to REPLACE the OFFSET. gnari
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера