ruby on rails - How do I tune a slow view -


i have rails 3.2 app view slow.

at=error code=h12 desc="request timeout" method=get path="/calendar" host=xxxx.ndeavor3.com request_id=8f38737e-f193-4949-be83-5295dd9c18dd fwd="198.50.4.5" dyno=web.1 connect=2ms service=30002ms status=503 bytes=0  

calendar view contains query :

<%= collection_select :workorder, :id, workorder.wonotclosed.where("employee_id = ?", current_user.employee.id), :id, :wonum_desc, :include_blank => 'none' %> 

would if index workorders on employee_id?

wonotclosed comparing wostatus_id - should index that?

thanks help!

first, i'd move gathering of work orders controller , out of view code.

also, think you're right index on employee_id here.


Comments

Popular posts from this blog

java - Andrioid studio start fail: Fatal error initializing 'null' -

android - Gradle sync Error:Configuration with name 'default' not found -

StringGrid issue in Delphi XE8 firemonkey mobile app -