Questions about LIMIT/OFFSET - Mailing list pgsql-general

From Josh Trutwin
Subject Questions about LIMIT/OFFSET
Date
Msg-id 20071019160304.2c09c21c@prokofiev.trutwins.homeip.net
Whole thread Raw
Responses Re: Questions about LIMIT/OFFSET  (Michael Glaesemann <grzm@seespotcode.net>)
List 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 by date:

Previous
From: Dimitri Fontaine
Date:
Subject: Re: Abbreviation list
Next
From: "Scott Marlowe"
Date:
Subject: Re: ERROR: Could not access status of transaction ####