<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Arkytekture &#187; advisor report</title>
	<atom:link href="http://psoug.org/blogs/arkytekture/tag/advisor-report/feed/" rel="self" type="application/rss+xml" />
	<link>http://psoug.org/blogs/arkytekture</link>
	<description>Oracle and Data architecture blog</description>
	<lastBuildDate>Sat, 18 Dec 2010 17:22:43 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Dear DBA ( a note from a principal developer)</title>
		<link>http://psoug.org/blogs/arkytekture/2010/04/17/dear-dba-a-note-from-a-principal-developer/</link>
		<comments>http://psoug.org/blogs/arkytekture/2010/04/17/dear-dba-a-note-from-a-principal-developer/#comments</comments>
		<pubDate>Sat, 17 Apr 2010 21:43:12 +0000</pubDate>
		<dc:creator>arkytekture</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[data loading]]></category>
		<category><![CDATA[advisor report]]></category>
		<category><![CDATA[append hint]]></category>
		<category><![CDATA[bulk loading]]></category>
		<category><![CDATA[commit strategy]]></category>
		<category><![CDATA[jdbc]]></category>
		<category><![CDATA[noarchive]]></category>
		<category><![CDATA[nologging]]></category>
		<category><![CDATA[redo log]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://psoug.org/blogs/arkytekture/?p=27</guid>
		<description><![CDATA[Besides changing commit intervals, noarchive,  nologging, and SQL append hints can greatly aid bulk-loading data to an Oracle system.]]></description>
				<content:encoded><![CDATA[<blockquote>
<p>Dear DBA, as I am running loadtests with product XYZ in preparation<br />
		for uploading of many thousands of XML documents , I find that there is something<br />
		that&#39;s bogging down your database. I thought your equipment<br />
		should easily outpace the old Compaqs that we have running Windows, and that<br />
		Oracle should do better than our PostgreSQL-based setup. Yet<br />
		I find the numbers show the opposite:</p>
<p>733 Documents in 2325.713 s for an average of 3.173 s<br />
		at ~11% CPU load</p>
<p>944 Documents in 1960.4 s for an average of 2.077 s<br />
		at ~15% CPU load</p>
<p>It takes 50% longer on the Oracle setup. Since the<br />
		application server load is negligible at the same time, it<br />
		goes to show that we are waiting for the database.</p>
<p>I wonder why.</p>
</blockquote>
<p><span id="more-27"></span><br />
	Hmmm, I thinking that this developer is not acquainted with the Oracle database technology choices available to him. He continues on.</p>
<blockquote>
<p>Since I can not observe the Oracle database server&#39;s IO and<br />
		CPU activity directly, I have looked at the Oracle ADVISOR<br />
		report [Query 2: ADVISOR REPORT below]. I am showing<br />
		the most important part from report on task_id 4313<br />
		and task_name ADDM:6344221675_1_1349:<br />
		|<br />
		| FINDING 1: 60% impact (489 seconds)<br />
		| &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
		| Waits on event &quot;log file sync&quot; while performing COMMIT and ROLLBACK<br />
		| operations<br />
		| were consuming significant database time.</p>
<p>Is there anything you could do about this? For example, could<br />
		you move the redo logs onto a different disk device? Or is this<br />
		database or hardware very busy processing other transactions?</p>
<p>The loading of data might take at least 50% longer than expected<br />
		(and possibly more, because we&#39;ll hit the database with 4-8<br />
		processes in parallel). Your help will be much appreciated.</p>
<p>regards,<br />
		Prince</p>
</blockquote>
<p>Dear Prince-<br />
	We&#39;ve noticed many (hundreds of thousands) insert statements being executed through jdbc-client and wondered what your commit strategy was.</p>
<p>Sometimes java programs have auto commit turned on (every DML statement is committed one-at-a-time). If that&#39;s the case, then it is causing a lot of round-trips through the network to confirm a committed row in the database.</p>
<p><!--more--></p>
<p>Other times, a bulk load will attempt to load thousands of rows at a time before committing. That can cause the growth of a large amount of undo segments that slows throughput as well. If that&#39;s the case then the commit interval needs to be changed.</p>
<p>If you are using jdbc&#39;s <a href="http://www.java2s.com/Code/JavaAPI/java.sql/PreparedStatementaddBatch.htm">addBatch</a> and <a href="http://www.java2s.com/Code/JavaAPI/java.sql/StatementexecuteBatch.htm">executeBatch</a> methods for processing multiple SQL statements, then you can make adjustments in how many rows in the batch that you need to commit.</p>
<p>Alternatively, you could make modifications to commit pending transactions after a given number of iterations in your code. If possible, try starting at 500 and varying it either higher or lower to meet your throughput goals.</p>
<p>One thing you should know about the test database that we&#39;re hosting is that we are not collecting and archiving redo logs.</p>
<p>We circulate through the logs very frequently. We have enlarged the redo log size to 200 MB (up from 55 MB), but we need to reduce the amount of redo being written. To that end, we recommend that the<br />
	insert SQL statements for the following tables be rewritten to use the <a href="http://psoug.org/reference/hints.html">&quot;Append&quot; hint</a> since it appears that you are performing bulk load inserts on them.</p>
<p>If you want, we can even put the target tables into &quot;nologging&quot; mode during this phase where you need to load a lot of data. That would ensure that you could put hundreds of thousands of rows in the database in a very brief period of time.</p>
]]></content:encoded>
			<wfw:commentRss>http://psoug.org/blogs/arkytekture/2010/04/17/dear-dba-a-note-from-a-principal-developer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
