Re: [Rails] sql performance

2013-01-16 Thread Dave Aronson
On Tue, Jan 15, 2013 at 5:25 AM, Werner webagentur.la...@googlemail.com wrote: Form entries are stored but on reload it gives me tons of: CACHE (0.0ms) SELECT `hours`.* FROM `hours` WHERE `hours`.`id` = 189 LIMIT 1 That sounds like you could benefit from a .includes on your initial load.

Re: [Rails] sql performance

2013-01-16 Thread Norm Scherer
On 01/16/2013 02:04 PM, Dave Aronson wrote: On Tue, Jan 15, 2013 at 5:25 AM, Werner webagentur.la...@googlemail.com wrote: Form entries are stored but on reload it gives me tons of: CACHE (0.0ms) SELECT `hours`.* FROM `hours` WHERE `hours`.`id` = 189 LIMIT 1 That sounds like you could

Re: [Rails] sql performance

2013-01-16 Thread Jordon Bedwell
On Wed, Jan 16, 2013 at 5:22 PM, Norm Scherer normsche...@earthlink.net wrote: On 01/16/2013 02:04 PM, Dave Aronson wrote: On Tue, Jan 15, 2013 at 5:25 AM, Werner webagentur.la...@googlemail.com wrote: Form entries are stored but on reload it gives me tons of: CACHE (0.0ms) SELECT

[Rails] sql performance

2013-01-15 Thread Werner
Hi all. I have a sql performance problem. Would be great to get some inspiration. model hour: id, week_id, :user_id, project_id, hour controller: @hours = Hour.project(@project.id) update: if params[:booking_user_ids] params[:booking_user_ids].each do