ANN assert_efficient_sql

This is a discussion on ANN assert_efficient_sql within the MySQL Database forums, part of the Database Forums category; To ensure your test cases call efficient MySQL... def test_my_case assert_efficient_sql do # just wrap them in this block! end end ...


Go Back   Usenet Forums > Database Forums > MySQL Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-14-2008
Phlip
 
Posts: n/a
Default ANN assert_efficient_sql

To ensure your test cases 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.

The goal is test cases that resist database pessimization, even as you change
your data relations, to add new features. If you run your tests after
every few changes, you can easily detect which change broke your database's
indices and relations.

Blog:

http://www.oreillynet.com/ruby/blog/...cient_sql.html

RDocs:

http://efficient-sql.rubyforge.org/

A critique:

http://enfranchisedmind.com/blog/200...efficient_sql/

--
Phlip
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:23 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0