<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Alter Table Rails Plugin</title>
	<atom:link href="http://devblog.xing.com/ruby/alter-table-rails-plugin/feed/" rel="self" type="application/rss+xml" />
	<link>http://devblog.xing.com/ruby/alter-table-rails-plugin/</link>
	<description>Programming tidbits and other insights from the developers at XING.com</description>
	<lastBuildDate>Wed, 16 May 2012 13:16:55 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: Scott W. Bradley</title>
		<link>http://devblog.xing.com/ruby/alter-table-rails-plugin/comment-page-1/#comment-329</link>
		<dc:creator>Scott W. Bradley</dc:creator>
		<pubDate>Sat, 04 Dec 2010 20:40:11 +0000</pubDate>
		<guid isPermaLink="false">http://devblog.xing.com/?p=188#comment-329</guid>
		<description>Thanks for the response, Tim. After my initial question I went ahead and did some simple benchmarks myself and blogged about them. I posted a link here in the comments but I think your spam filter probably ate it. (My post is named &quot;Huge speed gain migrating large tables in Rails&quot; at my blog linked to by my name above, in case anyone is interested.)

Anyway - my conclusion was the same as yours. Condensing 10 add_column/add_index/etc commands into a single alter_table block gave me roughly a 10x speed improvement.

Thanks again for the great plugin. I&#039;m using it all the time now.

-Scott</description>
		<content:encoded><![CDATA[<p>Thanks for the response, Tim. After my initial question I went ahead and did some simple benchmarks myself and blogged about them. I posted a link here in the comments but I think your spam filter probably ate it. (My post is named &#8220;Huge speed gain migrating large tables in Rails&#8221; at my blog linked to by my name above, in case anyone is interested.)</p>
<p>Anyway &#8211; my conclusion was the same as yours. Condensing 10 add_column/add_index/etc commands into a single alter_table block gave me roughly a 10x speed improvement.</p>
<p>Thanks again for the great plugin. I&#8217;m using it all the time now.</p>
<p>-Scott</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Timothy Payton</title>
		<link>http://devblog.xing.com/ruby/alter-table-rails-plugin/comment-page-1/#comment-317</link>
		<dc:creator>Timothy Payton</dc:creator>
		<pubDate>Tue, 26 Oct 2010 14:53:14 +0000</pubDate>
		<guid isPermaLink="false">http://devblog.xing.com/?p=188#comment-317</guid>
		<description>Hi Scott :)

It really is a big win.  Unfortunately we didn&#039;t save the exact numbers.  However, this is the pattern we saw:
When 2 alter table statements run against the same table and each takes 600 seconds.  If you combine those 2 into 1 alter table statement, the new one takes around 600 - 800 seconds. If you had say 3, 4, or 5, you see something around 100 seconds for each new alteration, e.g. 5 into 1 alter table would take around 1200 seconds.
Doing the math:
5 separate alter table statements             =&gt; 5 * 600               = 3000 seconds
1 alter table statement with 5 alterations =&gt; 600 + (5 * ~100) = 1200 seconds
You would save 3000 - 1200, or 1800 seconds!!
Also keep in mind the statement blocks, so you might actually have situations where you would rather do one 600 second alter table, and wait so perhaps some updates can get through, then do the next alter table.
Thanks for looking at our plugin :)

Tim</description>
		<content:encoded><![CDATA[<p>Hi Scott :)</p>
<p>It really is a big win.  Unfortunately we didn&#8217;t save the exact numbers.  However, this is the pattern we saw:<br />
When 2 alter table statements run against the same table and each takes 600 seconds.  If you combine those 2 into 1 alter table statement, the new one takes around 600 &#8211; 800 seconds. If you had say 3, 4, or 5, you see something around 100 seconds for each new alteration, e.g. 5 into 1 alter table would take around 1200 seconds.<br />
Doing the math:<br />
5 separate alter table statements             =&gt; 5 * 600               = 3000 seconds<br />
1 alter table statement with 5 alterations =&gt; 600 + (5 * ~100) = 1200 seconds<br />
You would save 3000 &#8211; 1200, or 1800 seconds!!<br />
Also keep in mind the statement blocks, so you might actually have situations where you would rather do one 600 second alter table, and wait so perhaps some updates can get through, then do the next alter table.<br />
Thanks for looking at our plugin :)</p>
<p>Tim</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott W. Bradley</title>
		<link>http://devblog.xing.com/ruby/alter-table-rails-plugin/comment-page-1/#comment-312</link>
		<dc:creator>Scott W. Bradley</dc:creator>
		<pubDate>Tue, 21 Sep 2010 16:21:53 +0000</pubDate>
		<guid isPermaLink="false">http://devblog.xing.com/?p=188#comment-312</guid>
		<description>I&#039;d be curious to hear some numbers. E.g.: in your example, what kind of speed improvement you get by combining everything into a single ALTER statement for what size of table. I am particularly interested to know: when I have an add_column and an add_index that each take an hour, does combining them make the total take only an hour? If so, that&#039;s a HUGE win...</description>
		<content:encoded><![CDATA[<p>I&#8217;d be curious to hear some numbers. E.g.: in your example, what kind of speed improvement you get by combining everything into a single ALTER statement for what size of table. I am particularly interested to know: when I have an add_column and an add_index that each take an hour, does combining them make the total take only an hour? If so, that&#8217;s a HUGE win&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Caffeine Driven Development &#187; Blog Archive &#187; L33t Links #80</title>
		<link>http://devblog.xing.com/ruby/alter-table-rails-plugin/comment-page-1/#comment-90</link>
		<dc:creator>Caffeine Driven Development &#187; Blog Archive &#187; L33t Links #80</dc:creator>
		<pubDate>Wed, 17 Feb 2010 16:08:20 +0000</pubDate>
		<guid isPermaLink="false">http://devblog.xing.com/?p=188#comment-90</guid>
		<description>[...] Alter Table Rails Plugin, very neat &#8211; should be part of Rails core [...]</description>
		<content:encoded><![CDATA[<p>[...] Alter Table Rails Plugin, very neat &#8211; should be part of Rails core [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Timothy Payton</title>
		<link>http://devblog.xing.com/ruby/alter-table-rails-plugin/comment-page-1/#comment-36</link>
		<dc:creator>Timothy Payton</dc:creator>
		<pubDate>Wed, 03 Feb 2010 13:30:24 +0000</pubDate>
		<guid isPermaLink="false">http://devblog.xing.com/?p=188#comment-36</guid>
		<description>Thanks Michael for the input.  You are right it should be an update for change_table, in the end.  
Initially we wanted to provide something that works without conflicting or overriding activerecord internals.
Providing the plugin first has a couple advantages: time to flesh out the design (integrating feedback like yours) and immediate support for the current (possibly past) version of rails.
After support for more databases is added, we plan on creating a patch for activerecord.
We really appreciate your feedback, thank you :)</description>
		<content:encoded><![CDATA[<p>Thanks Michael for the input.  You are right it should be an update for change_table, in the end.<br />
Initially we wanted to provide something that works without conflicting or overriding activerecord internals.<br />
Providing the plugin first has a couple advantages: time to flesh out the design (integrating feedback like yours) and immediate support for the current (possibly past) version of rails.<br />
After support for more databases is added, we plan on creating a patch for activerecord.<br />
We really appreciate your feedback, thank you :)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

