BatchedSqlFuThis is vendor specific to MySQL or any RDBMS that supports the syntax :
(col1, col2) VALUES ('val1', 'val2'), ('val3', 'val4'), ('val5', 'val6').
What it does is it overrides the insert method of the connection adapter for the duration of the block and flushes inserts every after 100 inserts are by the value you specify.
Line.create(:text => 'Hello')
Line.create(:text => 'World')
all statements will be the executed in one SQL.
Installruby script/plugin install http://batched-sql-fu.googlecode.com/svn/trunk/batched_sql_fu
CaveatsYou might not receive the expected result from Line.create or Line.save since the statements are executed later.
This plugin is experimental. Use it at your own risk!
Copyright (c) 2008 David, released under the MIT license
These details are provided for information only. No information here is legal advice and should not be used as such.