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