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
-
Chris Wanstrath December 25th, 2007 @ 08:24 AM
- State changed from new to open
- Assigned user changed from Chris Wanstrath to Mislav
-
Mislav December 29th, 2007 @ 12:37 PM
- State changed from open to resolved
Hey codyc, thanks for the patch. Applied in changeset 434
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.
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!