On 1 June 2015 at 13:38, Anthony <abasta...@gmail.com> wrote: > Just to be clear, the old behavior was a bug (and a particular problem > when the user sorted on a column within the grid, which overrides the > original orderby). Pagination is a fundamental feature of the grid, so it > ought to "just work." Note, we cannot leave it up to the developer to > explicitly specify the proper set of orderby fields because of the issue > with user-initiated sorting in the UI (which overrides the default ordering > specified by the developer). > > You have a special case in which you are willing to risk pagination errors > in order to boost speed. While that might be a reasonable trade-off in your > particular case, it is not necessarily appropriate default behavior. > However, we should certainly document the new behavior and the > auto_pagination option. > > If you'd like, you can do something like the following in a model: > > import functools > mygrid = functools.partial(SQLFORM.grid, auto_pagination=False) > > and then use mygrid in place of SQLFORM.grid in your code (though I > suspect in most cases you would still prefer the default behavior in order > to guarantee proper pagination when speed is not an issue). >
Thanks Anthony. Correct. I do not want it in all cases. After reading up on it I came accross this link ( http://chrisdone.com/posts/postgresql-pagination) where the author illustrates just how slow PostgreSQL's "OFFSET" can be which is probably part of my problem in this case. I will just have to develop alternative methods to work with cases where one queries millions of rows. One of my tables has more than 500 million records. Regards Johann -- 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/d/optout.