Rails is spewing sql in my soup (better sql logging for optimizing)
Im all pissy today because Rails is spewing all these sql statements out and I have no idea where they are coming from so I can add my little optimizations or what have you. As if I wasn’t already crying in my soup.
log_sql_caller(:include => 'SELECT count(*) from giraffes', :log_level => :error) { ... }
So I wrote a little plugin to print the callstack in the log so I don’t have to read eleventy billion lines of code! Or enable some debugger of pain.
ruby script/plugin install http://arperftoolkit.rubyforge.org/svn/trunk/log_sql_caller/
Que bueno! Now our soup is thick and moist like goat stew. Yum.