#166 ✓resolved
Cody Caughlan

Remove ORDER BY clause for COUNT(*) version of query

Reported by Cody Caughlan | November 30th, 2007 @ 09:17 PM

When using paginate_by_sql it was not stripping out my ORDER BY clause in the COUNT(*) version of my query. In my case, the ORDER BY clause adds a lot of overheard and its not needed to get a generic count.

I have patched finder.rb and added in the ability to strip out the ORDER BY clause for the COUNT(*) query.

Patch is attached.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Everyone's favorite Ruby library for pagination of practically anything!

People watching this ticket