On Wed, Jan 14, 2009 at 6:27 PM, Roan Kattouw roan.kattouw@home.nl wrote:
I knew about those, yes, but I didn't know LIMIT/OFFSET was non-standard, even though it seems to be the more widely used variant. Of course if offset handling isn't implemented at all, that's something to worry about.
You can always emulate it by rewriting
SELECT * FROM foo ORDER BY bar LIMIT m, n
as
SELECT * FROM (SELECT * FROM foo ORDER BY bar LIMIT m+n) ORDER BY bar DESC LIMIT n
or whatever (replacing LIMIT as appropriate). Other major DBMSes tend to implement subqueries more efficiently than MySQL too, AFAIK.
Ah, didn't know pgsql did those things too. I guess it's alright then, as long as performance stays acceptable.
Well, on small sites database performance isn't a big issue. On large sites, well, hopefully they'll have a DBA who can optimize it and give us patches. :)