MySQL query comments in Rails
37signals.com
MySQL query comments in Rails
1–10 of 21 posts
Re: MySQL query comments in Rails
#2One difference though: I prepend the comment instead of appending it.
Re: MySQL query comments in Rails
#3Re: MySQL query comments in Rails
#4Otherwise, neat idea, I like it.
Re: MySQL query comments in Rails
#5As for production, going with a fleshed-out service like NewRelic makes more sense to me. If I see slow queries start happening I'd want a broader report of what's going on in my system, not just a map of the query to a controller/action.
Re: MySQL query comments in Rails
#6Note that adding comments to otherwise identical queries will typically cause the MySQL query cache to not realize they are the same. See: http://www.mysqlperformanceblog.com/2008/03/20/mysql-query-c... Otherwise, neat idea, I like it.
Re: MySQL query comments in Rails
#7I dig this, a lot. Anyone know if there's a Django equivalent yet? If not, I know what I'll be doing with at least one evening this week...
Re: MySQL query comments in Rails
#8Note that adding comments to otherwise identical queries will typically cause the MySQL query cache to not realize they are the same. See: http://www.mysqlperformanceblog.com/2008/03/20/mysql-query-c... Otherwise, neat idea, I like it.
Most, if not all production mysql installations have this cache disabled anyways. (Based on my experience at Engine Yard for 3 years and other places the last 5 years.)
Re: MySQL query comments in Rails
#9I dig this, a lot. Anyone know if there's a Django equivalent yet? If not, I know what I'll be doing with at least one evening this week...
Django debug toolbar can show you where awk/grep queries are called
Re: MySQL query comments in Rails
#10I dig this, a lot. Anyone know if there's a Django equivalent yet? If not, I know what I'll be doing with at least one evening this week...