[mod_python] Perfect solution for split recordset by N number of records per page

Sean Davis sdavis2 at mail.nih.gov
Thu Sep 28 06:38:17 EDT 2006

On Thursday 28 September 2006 03:20, durumdara wrote:
> Hi !
> Basically the (db, web) server developers must limit the result(set).
> They must filter data tables with queries, they must must the limit
> record count that they get back to clients.

You outlined the major methods to do this, I think.  Use some version of limit 
and offset in whatever SQL variant you are using.  

> It is working with little resultset, but when I have 2000-10000 records,
> this method is too slow.

You probably need to think about tuning your database a bit to see if you can 
speed things up.  Make sure that you have the correct indices in place and 
than you are using limit/offset as best you can.  This is really a database 
problem as much as a web app design issue.  In other words, if your SQL query 
to get a "page" of data takes 3 seconds, this is a database issue, which I 
suppose it is.


More information about the Mod_python mailing list