I confess to having once written code that prints something like
"Items # 1 to 10 of 45"
by using select count(*) from t where condition; and select * from t where condition limit 10 offset x;

I now know this is "bad", I guess because of the count() and the offset.

So what is the preferred way? If it matters, my new application is servlet based, so I believe (but not positive) this means cursors are an option? Is this a better way to do this?

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to