William Sobel wrote:
I'll take a look and see if we have a similar issue. We can add paging fairly easily to the attendee list.

Cheers,
- Will Sobel


The query:

SELECT count(DISTINCT `events`.id) AS count_all FROM `events` LEFT OUTER JOIN `addresses` ON `addresses`.id = `events`.address_id WHERE (event_date >= '2009-02-26')

was really having an effect on overall DB CPU %usr time. Where I was going from 28% to 54% %usr time over a 600 sec run, after modifying the event_controller to not include the address when paginating the events in the index action it went from 21% to 29% during the same length run. It still creeps up, but less so.

The change was from:

# @events = Event.paginate :page => params[:page], :conditions => conditions, :order => session[:order], :per_page => 10, :include => :address

To:

@events = Event.paginate :page => params[:page], :conditions => conditions, :order => session[:order], :per_page => 10

I've yet to evaluate the functional implication.

Amanda

Reply via email to