<?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"
	>
<channel>
	<title>Comments on: Combining multiple INSERT statements with MySQL</title>
	<atom:link href="http://www.chapter31.com/2008/04/03/combining-multiple-insert-statements-with-mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.chapter31.com/2008/04/03/combining-multiple-insert-statements-with-mysql/</link>
	<description>development in a land far far away...</description>
	<pubDate>Wed, 15 Oct 2008 23:41:15 +0000</pubDate>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>By: Michael Sharman</title>
		<link>http://www.chapter31.com/2008/04/03/combining-multiple-insert-statements-with-mysql/#comment-46484</link>
		<dc:creator>Michael Sharman</dc:creator>
		<pubDate>Mon, 21 Apr 2008 00:36:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/?p=219#comment-46484</guid>
		<description>@Zac - I just remembered that the MyISAM storage engine for MySQL (which is what I mainly use) doesn't support transactions, so that wouldn't work unfortunately.</description>
		<content:encoded><![CDATA[<p>@Zac - I just remembered that the MyISAM storage engine for MySQL (which is what I mainly use) doesn&#8217;t support transactions, so that wouldn&#8217;t work unfortunately.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Sharman</title>
		<link>http://www.chapter31.com/2008/04/03/combining-multiple-insert-statements-with-mysql/#comment-44394</link>
		<dc:creator>Michael Sharman</dc:creator>
		<pubDate>Fri, 04 Apr 2008 21:59:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/?p=219#comment-44394</guid>
		<description>@Tony - Sorry I should have mentioned that, it works for both.

http://dev.mysql.com/doc/refman/5.0/en/insert.html

http://dev.mysql.com/doc/refman/4.1/en/insert.html</description>
		<content:encoded><![CDATA[<p>@Tony - Sorry I should have mentioned that, it works for both.</p>
<p><a href="http://dev.mysql.com/doc/refman/5.0/en/insert.html" rel="nofollow">http://dev.mysql.com/doc/refman/5.0/en/insert.html</a></p>
<p><a href="http://dev.mysql.com/doc/refman/4.1/en/insert.html" rel="nofollow">http://dev.mysql.com/doc/refman/4.1/en/insert.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tony Garcia</title>
		<link>http://www.chapter31.com/2008/04/03/combining-multiple-insert-statements-with-mysql/#comment-44323</link>
		<dc:creator>Tony Garcia</dc:creator>
		<pubDate>Fri, 04 Apr 2008 12:19:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/?p=219#comment-44323</guid>
		<description>Do you happen to know if this works with MySQL 4 and 5?</description>
		<content:encoded><![CDATA[<p>Do you happen to know if this works with MySQL 4 and 5?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Sharman</title>
		<link>http://www.chapter31.com/2008/04/03/combining-multiple-insert-statements-with-mysql/#comment-44269</link>
		<dc:creator>Michael Sharman</dc:creator>
		<pubDate>Fri, 04 Apr 2008 02:26:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/?p=219#comment-44269</guid>
		<description>@Zac - ah that makes sense! Great tip and thanks for clearing that up for me.

Heh, sorry about the textarea size. I need to upgrade my 'theme' soon so I'll be doing it then.</description>
		<content:encoded><![CDATA[<p>@Zac - ah that makes sense! Great tip and thanks for clearing that up for me.</p>
<p>Heh, sorry about the textarea size. I need to upgrade my &#8216;theme&#8217; soon so I&#8217;ll be doing it then.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zac spitzer</title>
		<link>http://www.chapter31.com/2008/04/03/combining-multiple-insert-statements-with-mysql/#comment-44267</link>
		<dc:creator>zac spitzer</dc:creator>
		<pubDate>Fri, 04 Apr 2008 01:40:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/?p=219#comment-44267</guid>
		<description>Transactions actually make a huge difference. Each insert statement actually means stop and write out to disk. Thus four inserts means stop and write out to disk four times. MySQL might be a bit different depeneding on the table type, but this is definately true for Oracle.

Wrapping inserts up in a transaction means that the db will then only write out to disk once.

Whenever you are inserting or updating a lot of data, wrapping the queries up in a transaction will speed things up a lot, just watch your hard disk light with and without a transaction. 

http://zacster.blogspot.com/2007/10/faster-inserts-and-updates-with.html

PS: any chance of a larger comment field?</description>
		<content:encoded><![CDATA[<p>Transactions actually make a huge difference. Each insert statement actually means stop and write out to disk. Thus four inserts means stop and write out to disk four times. MySQL might be a bit different depeneding on the table type, but this is definately true for Oracle.</p>
<p>Wrapping inserts up in a transaction means that the db will then only write out to disk once.</p>
<p>Whenever you are inserting or updating a lot of data, wrapping the queries up in a transaction will speed things up a lot, just watch your hard disk light with and without a transaction. </p>
<p><a href="http://zacster.blogspot.com/2007/10/faster-inserts-and-updates-with.html" rel="nofollow">http://zacster.blogspot.com/2007/10/faster-inserts-and-updates-with.html</a></p>
<p>PS: any chance of a larger comment field?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Sharman</title>
		<link>http://www.chapter31.com/2008/04/03/combining-multiple-insert-statements-with-mysql/#comment-44235</link>
		<dc:creator>Michael Sharman</dc:creator>
		<pubDate>Thu, 03 Apr 2008 20:18:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/?p=219#comment-44235</guid>
		<description>@Henry - Sorry, blog cut off your comment. Can you retry?</description>
		<content:encoded><![CDATA[<p>@Henry - Sorry, blog cut off your comment. Can you retry?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Sharman</title>
		<link>http://www.chapter31.com/2008/04/03/combining-multiple-insert-statements-with-mysql/#comment-44234</link>
		<dc:creator>Michael Sharman</dc:creator>
		<pubDate>Thu, 03 Apr 2008 20:18:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/?p=219#comment-44234</guid>
		<description>@David - I assume you mean BULK INSERT?

My understanding is that you use that for importing data from files on the hard disk (BULK INSERT for MSSQL and LOAD DATA INFILE for MySQL).</description>
		<content:encoded><![CDATA[<p>@David - I assume you mean BULK INSERT?</p>
<p>My understanding is that you use that for importing data from files on the hard disk (BULK INSERT for MSSQL and LOAD DATA INFILE for MySQL).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Sharman</title>
		<link>http://www.chapter31.com/2008/04/03/combining-multiple-insert-statements-with-mysql/#comment-44232</link>
		<dc:creator>Michael Sharman</dc:creator>
		<pubDate>Thu, 03 Apr 2008 20:13:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/?p=219#comment-44232</guid>
		<description>@Zac - I haven't benchmarked this but I may over the weekend. Agreed re: indexes.

Not sure how a transaction would help with performance, a transaction is an "all or nothing" type of operation (with the option to rollback to a particular point of course)

@Anuj - Yeah I didn't think you could do this with MSSQL! Oh well.</description>
		<content:encoded><![CDATA[<p>@Zac - I haven&#8217;t benchmarked this but I may over the weekend. Agreed re: indexes.</p>
<p>Not sure how a transaction would help with performance, a transaction is an &#8220;all or nothing&#8221; type of operation (with the option to rollback to a particular point of course)</p>
<p>@Anuj - Yeah I didn&#8217;t think you could do this with MSSQL! Oh well.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Henry</title>
		<link>http://www.chapter31.com/2008/04/03/combining-multiple-insert-statements-with-mysql/#comment-44222</link>
		<dc:creator>Henry</dc:creator>
		<pubDate>Thu, 03 Apr 2008 17:54:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/?p=219#comment-44222</guid>
		<description>What I do is I put the  that generate the insert statements INSIDE the , then there will only be only 1 cfquery / connection.</description>
		<content:encoded><![CDATA[<p>What I do is I put the  that generate the insert statements INSIDE the , then there will only be only 1 cfquery / connection.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Buhler</title>
		<link>http://www.chapter31.com/2008/04/03/combining-multiple-insert-statements-with-mysql/#comment-44215</link>
		<dc:creator>David Buhler</dc:creator>
		<pubDate>Thu, 03 Apr 2008 16:41:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/?p=219#comment-44215</guid>
		<description>Can you do a bulk update if the foreign IDs are the same?</description>
		<content:encoded><![CDATA[<p>Can you do a bulk update if the foreign IDs are the same?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
