AW: [Rails] Pagination Helper Thoughts

Lon Baker lon at speedymac.com
Fri Jan 14 12:39:39 GMT 2005


On Jan 14, 2005, at 7:00 AM, rails-request at lists.rubyonrails.org wrote:

> I don't understand your problem. My code typicall looks like this:

The two queries I am talking about occur when you are trying to perform 
"search" or filtering type of query, not a basic find.

In my specific case I am performing a fulltext search. In order to 
generate the pages in the page helper I need to discover a count of the 
records the search will return. After which I can perform the full 
search with the helper limit sql for the page view. This of course 
results in a second fulltext search which can place significant load on 
the db as the data set grows..

I am going to implement a max_fetch_limit in order manage this issue, 
so I am never pulling more than x number of records. After all most 
users in most applications have little patience to page though too many 
records.

In the end I understand it is something there is no real way around. 
Just was asking if anyone discovered a good way of managing this load.

Thanks for the responses!

--
Lon Baker



More information about the Rails mailing list