List:Internals« Previous MessageNext Message »
From:Phlip Date:January 14 2008 4:44am
Subject:assert_efficient_sql
View as plain text  
MsSQL-internal:

To ensure your test cases (under ActiveRecord) call efficient MySQL…

   def test_my_case
     assert_efficient_sql do
       # just wrap them in this block!
     end
   end

The assertion intercepts and copies out your MySQL SELECT statements, then calls 
EXPLAIN on each one, and inspects the results for common problems.

This article is a reference for this assertion’s options. The techniques should 
be ported to any database with an EXPLAIN

http://www.oreillynet.com/ruby/blog/2008/01/assert_efficient_sql.html

-- 
   Phlip

Thread
assert_efficient_sqlPhlip14 Jan
Re: assert_efficient_sqlPhlip14 Jan