For the edification of anyone who shows up here, the count * is used to
fill in total_entries and finding the number of pages.
If you need to work around this, you can use the :total_entries parameter,
aka:
Screenshot.paginate(:per_page => 20, :page => 1, :total_entries => 400)
Then when the paginator is rendered it will have 20 as it's highest page.
Cheers!
On Thursday, November 8, 2012 3:13:33 AM UTC-8, Jonathan Lin Ern Sheong
wrote:
> Is there a way to configure will_paginate to not count using COUNT(*)? I
> have a complex query and COUNT(*) is slowing the system down
> Thanks,
> Jon