On Monday, October 7, 2013 8:11:42 AM UTC-4, Michele Comitini wrote:

> Joahnn, yes on large datasets the ordering is devastating, since it causes 
> full table sweep even if not needed.
>
> We must add the orderby_on_limitby paramenters in the book because it 
> impacts large datasets.
> Shortcut queries that return single values like db.table(id=3) are already 
> optimized to avoid ordering.
>

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?

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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to