<?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: The value of multi insert values</title>
	<atom:link href="http://ronaldbradford.com/blog/the-value-of-multi-insert-values-2009-06-16/feed/" rel="self" type="application/rss+xml" />
	<link>http://ronaldbradford.com/blog/the-value-of-multi-insert-values-2009-06-16/</link>
	<description>Expert times and information on MySQL</description>
	<lastBuildDate>Fri, 12 Mar 2010 22:45:29 -0400</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Olly</title>
		<link>http://ronaldbradford.com/blog/the-value-of-multi-insert-values-2009-06-16/comment-page-1/#comment-576</link>
		<dc:creator>Olly</dc:creator>
		<pubDate>Fri, 03 Jul 2009 02:11:00 +0000</pubDate>
		<guid isPermaLink="false">http://ronaldbradford.com/blog/?p=1643#comment-576</guid>
		<description>I made extensive use of these bulk inserts, and combined them with &quot;ON DUPLICATE KEY UPDATE `columnname` = VALUES(columnname)&quot;.
You get really huge performance improvements from that.</description>
		<content:encoded><![CDATA[<p>I made extensive use of these bulk inserts, and combined them with &#8220;ON DUPLICATE KEY UPDATE `columnname` = VALUES(columnname)&#8221;.<br />
You get really huge performance improvements from that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shlomi Noach</title>
		<link>http://ronaldbradford.com/blog/the-value-of-multi-insert-values-2009-06-16/comment-page-1/#comment-582</link>
		<dc:creator>Shlomi Noach</dc:creator>
		<pubDate>Wed, 17 Jun 2009 04:36:22 +0000</pubDate>
		<guid isPermaLink="false">http://ronaldbradford.com/blog/?p=1643#comment-582</guid>
		<description>Combined with INSERT IGNORE, the multi-insert feature allows for a really nice peoperty:
You can insert 100 rows together, and those that fail a constraint (FOREIGN, UNIQUE), don&#039;t get inserted, now errors thrown, while all the rest get inserted just fine.</description>
		<content:encoded><![CDATA[<p>Combined with INSERT IGNORE, the multi-insert feature allows for a really nice peoperty:<br />
You can insert 100 rows together, and those that fail a constraint (FOREIGN, UNIQUE), don&#8217;t get inserted, now errors thrown, while all the rest get inserted just fine.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brooks Johnson</title>
		<link>http://ronaldbradford.com/blog/the-value-of-multi-insert-values-2009-06-16/comment-page-1/#comment-580</link>
		<dc:creator>Brooks Johnson</dc:creator>
		<pubDate>Wed, 17 Jun 2009 00:57:58 +0000</pubDate>
		<guid isPermaLink="false">http://ronaldbradford.com/blog/?p=1643#comment-580</guid>
		<description>The test conditions aren&#039;t exactly clear to me.  Were you sending the single inserts as a batch or one by one?  If as a batch, was autocommit on or were you committing all the inserts as one?</description>
		<content:encoded><![CDATA[<p>The test conditions aren&#8217;t exactly clear to me.  Were you sending the single inserts as a batch or one by one?  If as a batch, was autocommit on or were you committing all the inserts as one?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anders Karlsson</title>
		<link>http://ronaldbradford.com/blog/the-value-of-multi-insert-values-2009-06-16/comment-page-1/#comment-575</link>
		<dc:creator>Anders Karlsson</dc:creator>
		<pubDate>Tue, 16 Jun 2009 23:02:27 +0000</pubDate>
		<guid isPermaLink="false">http://ronaldbradford.com/blog/?p=1643#comment-575</guid>
		<description>Rereading what I wrote before, I realize my typing was worse than usual. Sorry anout that.</description>
		<content:encoded><![CDATA[<p>Rereading what I wrote before, I realize my typing was worse than usual. Sorry anout that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://ronaldbradford.com/blog/the-value-of-multi-insert-values-2009-06-16/comment-page-1/#comment-581</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Tue, 16 Jun 2009 22:43:35 +0000</pubDate>
		<guid isPermaLink="false">http://ronaldbradford.com/blog/?p=1643#comment-581</guid>
		<description>If you&#039;re using InnoDB in autocommit mode, you will also see a very large improvement from the multi/batched insert statement due to fewer commits.  Even moreso if you use innodb flush with setting 1.</description>
		<content:encoded><![CDATA[<p>If you&#8217;re using InnoDB in autocommit mode, you will also see a very large improvement from the multi/batched insert statement due to fewer commits.  Even moreso if you use innodb flush with setting 1.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anders Karlsson</title>
		<link>http://ronaldbradford.com/blog/the-value-of-multi-insert-values-2009-06-16/comment-page-1/#comment-579</link>
		<dc:creator>Anders Karlsson</dc:creator>
		<pubDate>Tue, 16 Jun 2009 22:28:29 +0000</pubDate>
		<guid isPermaLink="false">http://ronaldbradford.com/blog/?p=1643#comment-579</guid>
		<description>On the other hand, the ay Oracle does this with the array intercafe is even more performant (although requires a bit more programming). The Oracle C API (Pro*C or OCI) is not the easiest to get along with, but once you know them, they can kick butt. I know, I used to teach people how to use them.</description>
		<content:encoded><![CDATA[<p>On the other hand, the ay Oracle does this with the array intercafe is even more performant (although requires a bit more programming). The Oracle C API (Pro*C or OCI) is not the easiest to get along with, but once you know them, they can kick butt. I know, I used to teach people how to use them.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roland Bouman</title>
		<link>http://ronaldbradford.com/blog/the-value-of-multi-insert-values-2009-06-16/comment-page-1/#comment-578</link>
		<dc:creator>Roland Bouman</dc:creator>
		<pubDate>Tue, 16 Jun 2009 22:25:36 +0000</pubDate>
		<guid isPermaLink="false">http://ronaldbradford.com/blog/?p=1643#comment-578</guid>
		<description>Yes - very useful feature.

There are a few popular myths around this feature - some people still think this is MySQL-specific (it is not - Postgres supports it in v &gt;= 8.2; MS SQL Server supports it in v 2008), and some people think it is non-standard (it is in the 2003 version of the SQL standard)

Anyway, for Oracle, I sometimes generate scripts like this:

INSERT INTO t (col1,...,colX)
SELECT v1,...,vX FROM DUAL UNION ALL
SELECT v1,...,vX FROM DUAL UNION ALL
...
SELECT v1,...,vX FROM DUAL
;

clunky, but it does allow you to throw the data in there in one statement.</description>
		<content:encoded><![CDATA[<p>Yes &#8211; very useful feature.</p>
<p>There are a few popular myths around this feature &#8211; some people still think this is MySQL-specific (it is not &#8211; Postgres supports it in v &gt;= 8.2; MS SQL Server supports it in v 2008), and some people think it is non-standard (it is in the 2003 version of the SQL standard)</p>
<p>Anyway, for Oracle, I sometimes generate scripts like this:</p>
<p>INSERT INTO t (col1,&#8230;,colX)<br />
SELECT v1,&#8230;,vX FROM DUAL UNION ALL<br />
SELECT v1,&#8230;,vX FROM DUAL UNION ALL<br />
&#8230;<br />
SELECT v1,&#8230;,vX FROM DUAL<br />
;</p>
<p>clunky, but it does allow you to throw the data in there in one statement.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Callaghan</title>
		<link>http://ronaldbradford.com/blog/the-value-of-multi-insert-values-2009-06-16/comment-page-1/#comment-577</link>
		<dc:creator>Mark Callaghan</dc:creator>
		<pubDate>Tue, 16 Jun 2009 21:49:41 +0000</pubDate>
		<guid isPermaLink="false">http://ronaldbradford.com/blog/?p=1643#comment-577</guid>
		<description>MySQL has a few things that seem simple at first glance but make it very efficient. This is one. Having the client-server protocol push many rows at a time back to the client (rather than the client pull 1 row at a time) is another.</description>
		<content:encoded><![CDATA[<p>MySQL has a few things that seem simple at first glance but make it very efficient. This is one. Having the client-server protocol push many rows at a time back to the client (rather than the client pull 1 row at a time) is another.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
