Questions about LIMIT/OFFSET

Поиск
Список
Период
Сортировка
От Josh Trutwin
Тема Questions about LIMIT/OFFSET
Дата
Msg-id 20071019160304.2c09c21c@prokofiev.trutwins.homeip.net
обсуждение исходный текст
Ответы Re: Questions about LIMIT/OFFSET
Список pgsql-general
I'm going to be using a smarty plugin to paginate some result sets
for display in smarty templates. I was reading that using LIMIT/OFFSET
generates multiple query plans so I'm curious if it would be better
to do a:

SELECT * FROM table WHERE foo="bar" ORDER BY abc LIMIT x OFFSET y;

or just:

SELECT * FROM table WHERE foo="bar" ORDER BY abc;

and create my result set array for my templates using application ode
- increasing the likelihood of pulling the above query from the cache?
I'm sure the answer is "it depends" but curious what others do with
this?

Thanks,

Josh

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

Предыдущее
От: Dimitri Fontaine
Дата:
Сообщение: Re: Abbreviation list
Следующее
От: "Scott Marlowe"
Дата:
Сообщение: Re: ERROR: Could not access status of transaction ####