in reply to Class::DBI Pagination with Table Joins
And here's the problem with trying to abstract stuff like this. Either you pull it all into memory and chop it up that way, or you try to chop up the SQL query and rewrite it to do your pagination for you. I recently started a new job and they have a layer that psuedo-parses the SQL and does pagination, but of course it's problematic when you have "fancy" queries. If your database supports subqueries you can wrap an external query around your regular query and do pagination that way. Better yet, if your database supports views, create a view for each of these and make it appear that they are single tables. That way, the dumb modules can figure things out.