> db.table(id=3) is for returning the sole matching record, so you don't >> have to worry about the database's arbitrary ordering of results. But when >> using limitby to return a particular subset of records (e.g., when doing >> pagination), don't you need to specify an orderby to guarantee that the >> results on each query will remain in the same order? >> >> Yes you need to do it, and you need to do it in a proper way. That is > why i think that forcing orderby when limitby is used is not a good idea. > Seems just a hack for the grid, not a generic approach. IMHO it's better > to be explicit. > Consider that on datasets of size comparable to the window imposed by the > limitby, the result is that if one uses limitby then he goes slower than > without it, because of the implicit orderby. Maybe he wonders why (and all > sorts of bad things about web2py ;- ) >
I suppose we could default orderby_on_limitby to False in the general case and leave it to the developer to explicitly orderby when using limitby, but what do you propose for the grid? Anthony > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.