Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

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

#166

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.

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

State: resolved
Milestone: none
Assigned to: Mislav Mislav

Activity

  1. Chris Wanstrath
    Chris Wanstrath
    • State changed from new to open
    • Assigned user changed from Chris Wanstrath to Mislav

    December 25th, 2007 @ 08:24 AM

  2. Mislav
    Mislav
    • State changed from open to resolved

    Hey codyc, thanks for the patch. Applied in changeset 434

    December 29th, 2007 @ 12:37 PM

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.