<?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/"
		xmlns:xhtml="http://www.w3.org/1999/xhtml"
	>
<channel>
	<title>トランザクションを使ってSQLiteの処理を超高速化 へのコメント</title>
	<atom:link href="http://kumalog.com/2008/05/04210652.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://kumalog.com/2008/05/04210652.php</link>
	<description>ニッチなニュース、PC・インターネット関連、食など、気になったものをピックアップし、感想と共に紹介。</description>
	<lastBuildDate>Fri, 10 Feb 2012 08:23:22 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>通りすがり より</title>
		<link>http://kumalog.com/2008/05/04210652.php#comment-3542</link>
		<dc:creator>通りすがり</dc:creator>
		<pubDate>Mon, 26 Sep 2011 03:35:09 +0000</pubDate>
		<guid isPermaLink="false">http://morita.afstyle.net//wp/?p=240#comment-3542</guid>
		<description>SQLiteでINSERTやUPDATE等の排他ロックが必要なSQLを実行した場合、特に明示しなければ「SQLの実行毎に」自動的にトランザクション処理が行われます。※これをAutoCommitモードと呼び、設定を変更する事が可能です。

つまり、1000回実行すれば1000回DBに排他ロックがかかる訳で、その分遅くなってしまうわけです。

SQLを1000回実行する前後でトランザクションを明示すれば、AutoCommitは自動的にOFFになります。
ロック処理は明示した1回だけ行われますので、その分高速化されます。</description>
		<content:encoded><![CDATA[<p>SQLiteでINSERTやUPDATE等の排他ロックが必要なSQLを実行した場合、特に明示しなければ「SQLの実行毎に」自動的にトランザクション処理が行われます。※これをAutoCommitモードと呼び、設定を変更する事が可能です。</p>
<p>つまり、1000回実行すれば1000回DBに排他ロックがかかる訳で、その分遅くなってしまうわけです。</p>
<p>SQLを1000回実行する前後でトランザクションを明示すれば、AutoCommitは自動的にOFFになります。<br />
ロック処理は明示した1回だけ行われますので、その分高速化されます。</p>
]]></content:encoded>
	</item>
	<item>
		<title>栗きんとん大統領 より</title>
		<link>http://kumalog.com/2008/05/04210652.php#comment-3188</link>
		<dc:creator>栗きんとん大統領</dc:creator>
		<pubDate>Thu, 28 Jul 2011 08:47:03 +0000</pubDate>
		<guid isPermaLink="false">http://morita.afstyle.net//wp/?p=240#comment-3188</guid>
		<description>トランザクションを使わない例ではSQL文を実行する度にディスクへの書き込みが発生するが、トランザクションを使う場合には最後にコミットした段階でのみディスクへの書き込みが発生したために高速化したのだと思います。</description>
		<content:encoded><![CDATA[<p>トランザクションを使わない例ではSQL文を実行する度にディスクへの書き込みが発生するが、トランザクションを使う場合には最後にコミットした段階でのみディスクへの書き込みが発生したために高速化したのだと思います。</p>
]]></content:encoded>
	</item>
	<item>
		<title>ヨシダ より</title>
		<link>http://kumalog.com/2008/05/04210652.php#comment-1688</link>
		<dc:creator>ヨシダ</dc:creator>
		<pubDate>Sun, 30 Jan 2011 12:28:21 +0000</pubDate>
		<guid isPermaLink="false">http://morita.afstyle.net//wp/?p=240#comment-1688</guid>
		<description>マニュアルの「トランザクション」という言葉をそのまま持ってきたのですが、語弊があったならば申し訳ありません。</description>
		<content:encoded><![CDATA[<p>マニュアルの「トランザクション」という言葉をそのまま持ってきたのですが、語弊があったならば申し訳ありません。</p>
]]></content:encoded>
	</item>
	<item>
		<title>通りすがりの名無し より</title>
		<link>http://kumalog.com/2008/05/04210652.php#comment-1685</link>
		<dc:creator>通りすがりの名無し</dc:creator>
		<pubDate>Sat, 29 Jan 2011 04:52:55 +0000</pubDate>
		<guid isPermaLink="false">http://morita.afstyle.net//wp/?p=240#comment-1685</guid>
		<description>これは「トランザクションを使った」というより、
コミット実行の頻度を下げたのではないでしょうか。

前：INSERT：100回　COMMIT：100回
後：INSERT：100回　COMMIT：1回</description>
		<content:encoded><![CDATA[<p>これは「トランザクションを使った」というより、<br />
コミット実行の頻度を下げたのではないでしょうか。</p>
<p>前：INSERT：100回　COMMIT：100回<br />
後：INSERT：100回　COMMIT：1回</p>
]]></content:encoded>
	</item>
	<item>
		<title>技術志向 より</title>
		<link>http://kumalog.com/2008/05/04210652.php#comment-92</link>
		<dc:creator>技術志向</dc:creator>
		<pubDate>Sat, 03 Oct 2009 17:03:59 +0000</pubDate>
		<guid isPermaLink="false">http://morita.afstyle.net//wp/?p=240#comment-92</guid>
		<description>&lt;strong&gt;sqlite が遅いとき。クエリの高速化方法&lt;/strong&gt;

sqlite はトランザクション処理を行わないとINSERTやUPDATEの度に fsync() というシステムコールを実行して遅くなる。
fsync() は OS がディスクに書き込</description>
		<content:encoded><![CDATA[<p><strong>sqlite が遅いとき。クエリの高速化方法</strong></p>
<p>sqlite はトランザクション処理を行わないとINSERTやUPDATEの度に fsync() というシステムコールを実行して遅くなる。<br />
fsync() は OS がディスクに書き込</p>
]]></content:encoded>
	</item>
</channel>
</rss>

