<?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>DB Optimizer &#187; Uncategorized</title>
	<atom:link href="/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://dboptimizer.com</link>
	<description>database performance, SQL tuning and data visualizatoin</description>
	<lastBuildDate>Thu, 07 Jun 2018 15:59:24 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.6</generator>
		<item>
		<title>latency heatmaps in D3 and Highcharts</title>
		<link>http://dboptimizer.com/2013/08/12/latency-heatmaps-in-d3-and-highcharts/</link>
		<comments>http://dboptimizer.com/2013/08/12/latency-heatmaps-in-d3-and-highcharts/#comments</comments>
		<pubDate>Mon, 12 Aug 2013 18:17:52 +0000</pubDate>
		<dc:creator>Kyle Hailey</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dboptimizer.com/?p=3347</guid>
		<description><![CDATA[See Brendan Gregg&#8217;s blog on how important and cool heatmaps can be for showing latency information and how average latency hides what is really going on: &#160; Now if we want to create heatmap graphics, how can we do it? Two popular web methods for displaying graphics are Highcharts and D3. Two colleges of mine [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>See <a href=http://dtrace.org/blogs/brendan/2013/05/19/revealing-hidden-latency-patterns/>Brendan Gregg&#8217;s blog</a> on how important and cool heatmaps can be for showing latency information and how average latency hides what is really going on:<br />
<a href=http://dtrace.org/blogs/brendan/2013/05/19/revealing-hidden-latency-patterns/><img src=http://dtrace.org/blogs/brendan/files/2013/05/latency-heatmap-600.png></a></p>
<p>&nbsp;<br />
Now if we want to create heatmap graphics, how can we do it? Two popular web methods for displaying graphics are Highcharts and D3. Two colleges of mine whipped up some quick examples in both Highcharts and D3 to show latency heatmaps and those two examples are shown below. The data in the charts is random just for the purposes of showing examples of these graphics in actions.<br />
&nbsp;<br />
&nbsp;</p>
<h2>Highcharts Heatmap</h2>
<hr />

<!-- iframe plugin v.2.7 wordpress.org/plugins/iframe/ -->
<iframe src="http://jsfiddle.net/vladiweb/GNd3G/2/embedded/result/" width="100%" height="380" scrolling="no" class="iframe-class" frameborder="0"></iframe>
<p>see code at <a href="http://jsfiddle.net/vladiweb/GNd3G/">http://jsfiddle.net/vladiweb/GNd3G/</a></p>
<hr />
&nbsp;<br />
&nbsp;<br />
&nbsp;</p>
<h2>D3 Heatmap</h2>
<hr />

<!-- iframe plugin v.2.7 wordpress.org/plugins/iframe/ -->
<iframe src="http://jsfiddle.net/eyalkaspi/YH8sw/2/embedded/result/" width="100%" height="380" scrolling="no" class="iframe-class" frameborder="0"></iframe>
<p>see code at<br />
<a href="http://jsfiddle.net/eyalkaspi/YH8sw">http://jsfiddle.net/eyalkaspi/YH8sw</a></p>
<hr />
]]></content:encoded>
			<wfw:commentRss>http://dboptimizer.com/2013/08/12/latency-heatmaps-in-d3-and-highcharts/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Popularity vs Productivity vs Performance</title>
		<link>http://dboptimizer.com/2013/07/22/popularity-vs-productivity-vs-performance/</link>
		<comments>http://dboptimizer.com/2013/07/22/popularity-vs-productivity-vs-performance/#comments</comments>
		<pubDate>Mon, 22 Jul 2013 15:05:58 +0000</pubDate>
		<dc:creator>Kyle Hailey</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dboptimizer.com/?p=3262</guid>
		<description><![CDATA[This is a reposting with some updates of a post from a couple of years ago. It is a huge decision to make at the beginning of a project as to which language to use and why. As the founder of Slideshare said  when asked if he regretted not using Java instead of Ruby his response [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>This is a <span class="GINGER_SOFATWARE_correct">reposting</span> with some updates of a post from a couple of years ago. It is a huge decision to make at the beginning of a project as to which language to use and why. As the founder of Slideshare said  when asked if he regretted not using Java instead of Ruby his response was that the question was mute, that he wouldn&#8217;t even be there talking if he had <span class="GINGER_SOFATWARE_correct">use</span> Java. Sure Java would have scaled better and Ruby had concurrency issues but  Slideshare would not have succeeded, at least not  as fast,  or possibly not even existed had they used Java.</p>
<p><span class="GINGER_SOFATWARE_correct">Related</span> is  a discussion of functional programming verses object oriented programming</p>
<ul>
<li><a style="font-size: 13px; line-height: 19px;" href="http://blog.fogus.me/2013/07/22/fp-vs-oo-from-the-trenches/">http://blog.fogus.me/2013/07/22/fp-vs-oo-from-the-trenches/</a></li>
<li><a style="font-size: 13px; line-height: 19px;" href="https://news.ycombinator.com/item?id=6083770">https://news.ycombinator.com/item?id=6083770</a></li>
</ul>
<hr />
<p>Update Aug 2013</p>
<p><span class="GINGER_SOFATWARE_correct">Fascinating article</span> about how languages are becoming more expressive</p>
<p><a href="http://redmonk.com/dberkholz/2013/07/23/are-we-getting-better-at-designing-programming-languages/">http://redmonk.com/dberkholz/2013/07/23/are-we-getting-better-at-designing-programming-languages/</a></p>
<p style="text-align: center;"><a href="/wp-content/uploads/2013/07/Screen-Shot-2013-07-23-at-8.04.41-PM.png"><img class="aligncenter  wp-image-3298" alt="Screen Shot 2013-07-23 at 8.04.41 PM" src="/wp-content/uploads/2013/07/Screen-Shot-2013-07-23-at-8.04.41-PM.png" width="642" height="449" /></a></p>
<p style="text-align: center;">
<p style="text-align: left;"><a href="http://redmonk.com/sogrady/2013/07/25/language-rankings-6-13/">http://redmonk.com/sogrady/2013/07/25/language-rankings-6-13/</a></p>
<p style="text-align: center;"><a href="/wp-content/uploads/2013/07/Screen-Shot-2013-07-26-at-8.38.36-AM.png"><img class="aligncenter  wp-image-3304" alt="Screen Shot 2013-07-26 at 8.38.36 AM" src="/wp-content/uploads/2013/07/Screen-Shot-2013-07-26-at-8.38.36-AM.png" width="677" height="422" /></a></p>
<p style="text-align: left;">
<hr />
<p>Update July 2013:</p>
<p>Larry Wall: “Java is sort of the Cobol of the 21st century” , <a href="http://www.youtube.com/watch?v=LR8fQiskYII">http://www.youtube.com/watch?v=LR8fQiskYII</a></p>
<p><a href="http://www.i-programmer.info/news/98-languages/6102-which-languages-have-most-influence.html">Another perspective on languages </a>, the most influential languages:</p>
<p><a href="/wp-content/uploads/2011/03/Screen-Shot-2013-07-16-at-9.52.35-AM.png"><img alt="Screen Shot 2013-07-16 at 9.52.35 AM" src="/wp-content/uploads/2011/03/Screen-Shot-2013-07-16-at-9.52.35-AM.png" width="574" height="440" /></a></p>
<hr />
<p>Update June 2013: Python rockets to ascension and Java becomes <span class="GINGER_SOFATWARE_correct">lack luster</span></p>
<p><a href="/wp-content/uploads/2011/03/download.jpeg"><img alt="download" src="/wp-content/uploads/2011/03/download.jpeg" width="614" height="461" /></a></p>
<p><a href="http://blog.codeeval.com/codeevalblog/most-popular-programming-languages-of-2013">http://blog.codeeval.com/codeevalblog/most-popular-programming-languages-of-2013</a></p>
<hr />
<p>&nbsp;</p>
<h1>What to choose</h1>
<p>A more popular car will have better servicing as parts and skills will be common. A fast car is compelling but sometimes speed is easily sacrificed for comfort.</p>
<p>Recently the question of language efficiency verses productivity has been nagging me. The nagging question includes  what  languages, frameworks and packages are best for collecting data, analyzing data and exposing the data in a rich UI via a web browser.</p>
<h2>Productivity</h2>
<p>Here is an interesting graphic on <span class="GINGER_SOFATWARE_correct">speed</span> of the programs in various languages</p>
<p><a href="http://hinchcliffe.org/img/weblanguagecomparison2.png"><img title="weblanguagecomparison2" alt="" src="/wp-content/uploads/2011/03/weblanguagecomparison2-300x211.png" width="300" height="211" /></a></p>
<p><a href="http://hinchcliffe.org/img/weblanguagecomparison2.png">http://hinchcliffe.org/img/weblanguagecomparison2.png</a></p>
<p>Now the above graphic might be hard to read (wish it was larger) but what it is indicating is that Python is  roughly 10x times slower <span class="GINGER_SOFATWARE_correct">in</span> execution time to than the equivalent programs in Java. On the other hand the expected productivity gain for a programmer is 5-10x faster in Python than Java. Now on the surface my reaction is “OK, it’s faster to program in Python, ok, but Java is 10x faster so it’s clearly the choice!”, but if I put the numbers into real life I’m like OMG – imagine a Python program that takes 1 day to write, now that same program would take 5-10 days <span class="GINGER_SOFATWARE_correct">in</span> Java!? <span class="GINGER_SOFATWARE_correct">Thats</span> a huge deal. Hands down, I’m going to program in Python (or something other than Java).  I can deal with some runtime performance issues.</p>
<p>Should a company program in Java or Python? What if Python would take a year to bring to market? What if the Java <span class="GINGER_SOFATWARE_correct">verison</span> took 5-10 years ?!  When asked whether if he could go back and recreate Slideshare in some other language than Ruby<span class="GINGER_SOFATWARE_correct">,</span><a href="http://www.jonathanboutelle.com/">Jonathan Boutelle,</a> said the question is mute. If they  had written it Java instead of Ruby they wouldn’t even be having the conversation. Sure Ruby had some scaling issues for them, but they  released  Slideshare on the market and became successful.</p>
<p>Here is another graphic on productivity from the book “<a href="http://pragprog.com/titles/fr_j2r/from-java-to-ruby">From Java to Ruby</a>”</p>
<p><a href="http://media.pragprog.com/titles/fr_j2r/Pain.pdf"><img title="productivity" alt="" src="/wp-content/uploads/2011/03/productivity.png" width="416" height="244" /></a></p>
<p>The data is <span class="GINGER_SOFATWARE_correct">base</span> on a study of productivity in C, Java, Perl, Python: <a href="http://page.mi.fu-berlin.de/prechelt/Biblio//jccpprt_computer2000.pdf">http://page.mi.fu-berlin.de/prechelt/Biblio//jccpprt_computer2000.pdf</a></p>
<p>As far as productivity comparisons, I think the following two images of Python <span class="GINGER_SOFATWARE_noSuggestion GINGER_SOFATWARE_correct">vs</span> Java explain it nicely:</p>
<p>Python</p>
<p><a href="/wp-content/uploads/2011/03/image211.png"><img alt="image21" src="/wp-content/uploads/2011/03/image211.png" width="297" height="122" /></a></p>
<p>Java equivalent</p>
<p><a href="/wp-content/uploads/2011/03/image20-300x2511.png"><img alt="image20-300x251" src="/wp-content/uploads/2011/03/image20-300x2511.png" width="300" height="251" /></a></p>
<p><a href="http://blog.chenzhongke.com/2010/05/why-python-is-more-productive-than-java.html">http://blog.chenzhongke.com/2010/05/why-python-is-more-productive-than-java.html</a></p>
<p>For a down and out dirty view of Java sprawl that further exacerbates productivity check out:</p>
<p><a href="http://chaosinmotion.com/blog/?p=622">http://chaosinmotion.com/blog/?p=622</a></p>
<p>(<span class="GINGER_SOFATWARE_correct">as</span> a rebuttal <span class="GINGER_SOFATWARE_correct">try</span> pursing hello world in gnu packaging : <a href="http://ftp.gnu.org/gnu/hello/hello-2.6.tar.gz" target="_blank">http://ftp.gnu.org/gnu/hello/hello-2.6.tar.gz</a> )</p>
<h2>Performance</h2>
<p>Here is a fascinating site with empirical data on speed of languages</p>
<p><a href="http://shootout.alioth.debian.org/"><img title="chartvs" alt="" src="/wp-content/uploads/2011/03/chartvs-300x187.png" width="300" height="187" /></a></p>
<p><a href="http://shootout.alioth.debian.org/u32/benchmark.php?test=all&amp;lang=yarv&amp;lang2=javaxint"><img title="javaint_vs_ruby19" alt="" src="/wp-content/uploads/2011/03/javaint_vs_ruby19-300x187.png" width="300" height="187" /></a></p>
<p><a href="http://shootout.alioth.debian.org/">http://shootout.alioth.debian.org/</a></p>
<p>Current speed might be a bit misleading as popularity will impact the efforts put into the issues of a language and a language that is popular though maybe less efficient will see improvements, for example it’s interesting to see the improvements in Java over the years, and now to see the improvements in Ruby.  Though Ruby is slower than  Scala and Scala’s productivity may even be better than Ruby, Scala doesn’t, yet, have the market momentum, thus the assurances that it is a language to invest in now.</p>
<p>Also if <span class="GINGER_SOFATWARE_correct">speed</span> of the language is an issue the solution is not to throw the baby out with the bathwater, <span class="GINGER_SOFATWARE_correct">ie</span> throw out the productive programming language altogether and go for a fast one such as C or JAVA but to find the areas of slowness in the productive framework and replace those with a fast function in another language, <span class="GINGER_SOFATWARE_correct">ie</span> <a href="http://memeagora.blogspot.com/2006/12/polyglot-programming.html">polyglot programming</a>.</p>
<h2>Popularity</h2>
<p><span class="GINGER_SOFATWARE_correct">another</span> interesting image on the current usage of languages:</p>
<p><a href="http://www.dataists.com/2010/12/ranking-the-popularity-of-programming-langauges/"><img title="rank_scatter1" alt="" src="/wp-content/uploads/2011/03/rank_scatter1-300x225.png" width="300" height="225" /></a></p>
<p><a href="http://www.dataists.com/2010/12/ranking-the-popularity-of-programming-langauges/">http://www.dataists.com/2010/12/ranking-the-popularity-of-programming-langauges/</a></p>
<p>Languages mentioned in job postings as % and % increase</p>
<p><a href="http://www.soa-at-work.com/2010/02/it-job-trends-which-technologies-you.html"><img title="jobgraph_percent" alt="" src="/wp-content/uploads/2011/03/jobgraph_percent-300x166.png" width="300" height="166" /></a></p>
<p><a href="http://www.soa-at-work.com/2010/02/it-job-trends-which-technologies-you.html"><img title="jobgraph_percentgrowth" alt="" src="/wp-content/uploads/2011/03/jobgraph_percentgrowth-300x166.png" width="300" height="166" /></a></p>
<p><a href="http://www.soa-at-work.com/2010/02/it-job-trends-which-technologies-you.html">http://www.soa-at-work.com/2010/02/it-job-trends-which-technologies-you.html</a></p>
<p>The issues of showing total growth  verses % growth lend itself well to heat map representation. Here is a heat map from O’Reilly:</p>
<p><a href="http://radar.oreilly.com/2009/02/state-of-the-computer-book-mar-22.html"><img title="TM_qtr_py_Prog_Lang" alt="" src="/wp-content/uploads/2011/03/TM_qtr_py_Prog_Lang.jpg" width="562" height="407" /></a></p>
<p>(Interesting to all the Oracle folks: PL/SQL shows a 51% growth 2007-2008.</p>
<p>Here is data from O’Reilly on growth over time, showing Python and C# growing steadily:</p>
<p><a href="http://radar.oreilly.com/2009/02/state-of-the-computer-book-mar-22.html"><img title="languages_all_5yrs" alt="" src="/wp-content/uploads/2011/03/languages_all_5yrs-1024x708.png" width="430" height="298" /></a></p>
<p><a href="http://radar.oreilly.com/2009/02/state-of-the-computer-book-mar-22.html">http://radar.oreilly.com/2009/02/state-of-the-computer-book-mar-22.html</a></p>
<p><a href="http://radar.oreilly.com/2011/02/2010-book-market-4.html">http://radar.oreilly.com/2011/02/2010-book-market-4.html</a></p>
<p><span class="GINGER_SOFATWARE_correct">Tiobe</span> Index</p>
<p><a href="http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html"><img title="tpci_trends" alt="" src="/wp-content/uploads/2011/03/tpci_trends-300x225.png" width="300" height="225" /></a></p>
<p><a href="http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html">http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html</a></p>
<p>Here <span class="GINGER_SOFATWARE_correct">is</span> google trends normalized by <span class="GINGER_SOFATWARE_correct">C programming</span> (with out normalization all trends are down because <span class="GINGER_SOFATWARE_correct">google</span> trends show hits normalized by all traffic and as general traffic increases verses computer geek searches general computer geek searches <a href="http://www.chrisrenner.com/2011/03/omg-php-is-losing-to-ruby-python/">trend downwards</a>)</p>
<p><a href="/wp-content/uploads/2011/03/ruby_perl_python_java_smooth.png"><img title="ruby_perl_python_java_smooth" alt="" src="/wp-content/uploads/2011/03/ruby_perl_python_java_smooth-1024x427.png" width="717" height="299" /></a></p>
<p>Interesting how Ruby seems to be trending down (as normalized against C  searches)<a href="/wp-content/uploads/2011/03/ruby_python_smooth.png"><img title="ruby_python_smooth" alt="" src="/wp-content/uploads/2011/03/ruby_python_smooth-1024x427.png" width="717" height="299" /></a></p>
<p><span class="GINGER_SOFATWARE_correct">another</span> perspective: Google Insights:</p>
<table width="320" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td colspan="2"><a href="http://www.google.com/trends/" target="_top">Google Insights for Search</a></td>
</tr>
<tr>
<td colspan="2"></td>
</tr>
<tr>
<td colspan="2">
<div><iframe id="2010036756" name="2010036756" src="http://www-open-opensocial.googleusercontent.com/gadgets/ifr?url=http%3A%2F%2Fwww.google.com%2Fig%2Fmodules%2Fgoogle_insightsforsearch_interestovertime_searchterms.xml&amp;container=open&amp;view=home&amp;lang=en-us&amp;country=ALL&amp;debug=0&amp;nocache=0&amp;sanitize=0&amp;v=8f78dc0e8fbd2fec&amp;source=http%3A%2F%2Fdboptimizer.com%2F2011%2F03%2F14%2Fpopularity-vs-performance-vs-productivity%2F&amp;parent=http%3A%2F%2Fdboptimizer.com%2F2011%2F03%2F14%2Fpopularity-vs-performance-vs-productivity%2F&amp;libs=core%3Acore.io%3Arpc#up__property=empty&amp;up__search_terms=c%7Cjava%7Cruby%7Cperl%7Cpython&amp;up__location=empty&amp;up__category=31&amp;up__compare_to_category=false&amp;up__time_range=empty&amp;st=%25st%25&amp;rpctoken=2010036756" height="350" width="320" frameborder="0" scrolling="no"></iframe></div>
</td>
</tr>
<tr>
<td><a href="http://fusion.google.com/ig/add?synd=open&amp;source=ggyp&amp;moduleurl=http://www.google.com/ig/modules/google_insightsforsearch_interestovertime_searchterms.xml" target="_top"><img alt="" src="http://www.gmodules.com/ig/images/plus_google.gif" /></a></td>
<td><a href="http://www.google.com/webmasters/gadgets.html" target="_top">Gadgets</a> powered by Google</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<h2>Just for Fun</h2>
<p><span class="GINGER_SOFATWARE_correct">here</span>  is how I started my morning, a fun video on Python, that catalyzed the above discussion: <a href="http://blip.tv/play/g4VigqrwEgI%2Em4v">http://blip.tv/play/g4VigqrwEgI%2Em4v</a></p>
<h2><span class="GINGER_SOFATWARE_correct">other</span> links</h2>
<ul>
<li><span class="GINGER_SOFATWARE_correct">humor</span> relief <span class="GINGER_SOFATWARE_correct">to</span> this blog post<span class="GINGER_SOFATWARE_correct">:</span>A cheeky st0ry of programming languages <a href="http://james-iry.blogspot.com/2009/05/brief-incomplete-and-mostly-wrong.html">http://james-iry.blogspot.com/2009/05/brief-incomplete-and-mostly-wrong.html</a></li>
<li><span class="GINGER_SOFATWARE_correct">popular</span> programming languages: <a title="popular programming languages" href="http://www.readwriteweb.com/hack/2012/06/5-ways-to-tell-which-programming-lanugages-are-most-popular.php">http://www.readwriteweb.com/hack/2012/06/5-ways-to-tell-which-programming-lanugages-are-most-popular.php</a></li>
<li><span class="GINGER_SOFATWARE_correct">hello</span> world in different JVM/CLR languages <a href="http://carlosqt.blogspot.com/2010/06/most-active-net-and-jvm-languages.html">http://carlosqt.blogspot.com/2010/06/most-active-net-and-jvm-languages.html</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://dboptimizer.com/2013/07/22/popularity-vs-productivity-vs-performance/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>SQL joins visualized in a surprising way</title>
		<link>http://dboptimizer.com/2013/06/26/3107/</link>
		<comments>http://dboptimizer.com/2013/06/26/3107/#comments</comments>
		<pubDate>Wed, 26 Jun 2013 03:54:48 +0000</pubDate>
		<dc:creator>Kyle Hailey</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dboptimizer.com/?p=3107</guid>
		<description><![CDATA[see more at: SQL tuning with VST Saw a good posting on SQL joins today that echoes a classic image of SQL joins: I loved this graphic when I first saw it. Seeing the graphic made me think &#8220;wow, I can actually wrap my mind around these crazy SQL joins.&#8221; But there is more to [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>see more at: <a href="http://www.slideshare.net/khailey/12b-sqltuning-vst">SQL tuning with VST</a></p>
<hr />
<p>Saw a good<a href="http://www.developingthefuture.net/types-of-joins-in-sql/"> posting on SQL joins</a> today that echoes a classic image of SQL joins:</p>
<p style="text-align: center;"><a href="http://www.codeproject.com/Articles/33052/Visual-Representation-of-SQL-Joins"><img class="aligncenter  wp-image-3108" alt="Visual_SQL_JOINS_orig" src="/wp-content/uploads/2013/06/Visual_SQL_JOINS_orig.jpg" width="580" height="456" /></a></p>
<p>I loved this graphic when I first saw it. Seeing the graphic made me think &#8220;wow, I can actually wrap my mind around these crazy SQL joins.&#8221;</p>
<p>But there is more to SQL joins than meets the eye, at least in these pictures. These pictures leave out the effects of projection and amplification. For example, just taking the simplest case of a two table join (an inner join):</p>
<p style="text-align: center;"><a href="/wp-content/uploads/2013/06/Screen-Shot-2013-06-25-at-10.16.39-PM.png"><img class="aligncenter  wp-image-3111" alt="Screen Shot 2013-06-25 at 10.16.39 PM" src="/wp-content/uploads/2013/06/Screen-Shot-2013-06-25-at-10.16.39-PM.png" width="248" height="170" /></a></p>
<p style="text-align: left;">The intersection in the above graphic makes sense and looks simple, but to get a simple intersection requires that the two sets, the two tables,  be related by one-to-one relationships. Let&#8217;s take a simple query to illustrate the point:</p>
<p style="text-align: center;"><a href="/wp-content/uploads/2013/06/Screen-Shot-2013-06-26-at-1.00.06-PM.png"><img class="aligncenter  wp-image-3128" alt="Screen Shot 2013-06-26 at 1.00.06 PM" src="/wp-content/uploads/2013/06/Screen-Shot-2013-06-26-at-1.00.06-PM.png" width="246" height="191" /></a></p>
<p style="text-align: left;">In the query we join tables A and B. In blue I&#8217;ve added a &#8220;predicate filter&#8221; which limits the rows that are joined.</p>
<hr />
<p style="text-align: center;"><a href="/wp-content/uploads/2013/06/Screen-Shot-2013-06-25-at-10.16.48-PM.png"><img class="aligncenter  wp-image-3112" alt="Screen Shot 2013-06-25 at 10.16.48 PM" src="/wp-content/uploads/2013/06/Screen-Shot-2013-06-25-at-10.16.48-PM.png" width="557" height="350" /></a></p>
<p style="text-align: left;">In a one to one relationship, for every value 1 in table A.field there will be one and only one value in table B.field. This is what the join diagram is showing, but how often do data models have one-to-one relationships? Sure it happens once in a while but the main relationship is one-to-many, which actually causes projections and not intersections.</p>
<hr />
<p style="text-align: center;"><a href="/wp-content/uploads/2013/06/Screen-Shot-2013-06-25-at-10.04.35-PM.png"><img class="aligncenter  wp-image-3110" alt="Screen Shot 2013-06-25 at 10.04.35 PM" src="/wp-content/uploads/2013/06/Screen-Shot-2013-06-25-at-10.04.35-PM.png" width="601" height="401" /></a></p>
<p style="text-align: center;"><a href="/wp-content/uploads/2013/06/Screen-Shot-2013-06-25-at-10.04.29-PM.png"><img class="aligncenter  wp-image-3113" alt="Screen Shot 2013-06-25 at 10.04.29 PM" src="/wp-content/uploads/2013/06/Screen-Shot-2013-06-25-at-10.04.29-PM.png" width="342" height="196" /></a></p>
<p style="text-align: left;">Most often tables are related by a one to many relationship, a parent to child relationship. For example one customer can have many orders, but each order pertains to one and only one customer. With one to many we no longer get the neat intersections of two circles but a &#8220;projection&#8221; of one set onto the other. The number of rows is limited by the maximum rows returned by the predicate filter in table A and B.</p>
<p style="text-align: left;">The most surprising case is amplification or multiplying of rows returned due to many-to-many relationships and thus illustrating part of the reason why many-to-many relationships are problematic</p>
<hr />
<p style="text-align: center;"><a href="/wp-content/uploads/2013/06/Screen-Shot-2013-06-25-at-10.04.15-PM.png"><img class="aligncenter  wp-image-3116" alt="Screen Shot 2013-06-25 at 10.04.15 PM" src="/wp-content/uploads/2013/06/Screen-Shot-2013-06-25-at-10.04.15-PM.png" width="626" height="485" /></a></p>
<p style="text-align: center;"><a href="/wp-content/uploads/2013/06/Screen-Shot-2013-06-25-at-10.04.24-PM.png"><img class="aligncenter  wp-image-3114" alt="Screen Shot 2013-06-25 at 10.04.24 PM" src="/wp-content/uploads/2013/06/Screen-Shot-2013-06-25-at-10.04.24-PM.png" width="401" height="218" /></a></p>
<p style="text-align: left;">With many to many relationships, the maximum rows returned is the number of rows returned in A with the predicate filter multiplied by the number of rows in B returned  after the predicate filter  all divided  by the minimum of the number of distinct values (NDV) returned on A or B after the predicate filter is applied.</p>
<p style="text-align: left;">In the above example that is (4*2)/ min(1,1) = 8</p>
<p style="text-align: left;">With more rows returned by either or both of table A and B, the effect can flood a query with rows to process.</p>
<p style="text-align: left;">All of this illustrates to me that SQL can be complex, more complex than the useful graphics at the top of the page would suggest.</p>
]]></content:encoded>
			<wfw:commentRss>http://dboptimizer.com/2013/06/26/3107/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>KScope 2013: win DB Optimizer License at SQL Tuning presentation</title>
		<link>http://dboptimizer.com/2013/06/24/kscope-2013-win-db-optimizer-license-at-sql-tuning-presentation/</link>
		<comments>http://dboptimizer.com/2013/06/24/kscope-2013-win-db-optimizer-license-at-sql-tuning-presentation/#comments</comments>
		<pubDate>Mon, 24 Jun 2013 11:39:42 +0000</pubDate>
		<dc:creator>Kyle Hailey</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dboptimizer.com/?p=3092</guid>
		<description><![CDATA[SQL Tuning Methodology    Wednesday, June 26th  Session 13, Bayside C from 11:15 – 12:15 on    Giving way 2 free copies of DB Optimizer at presentation ($4000 of software) On Wednesday 11:15  at ODTUG aka KSCOPE 2013 in New Orleans I&#8217;ll be giving away 2 copies of Embarcadero&#8217;s DB Optimizer which automates SQL tuning [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><a href="http://kscope13.com/component/seminar/seminarslist#SQL Tuning Methodology for Developers">SQL Tuning Methodology</a></p>
<div>   Wednesday, June 26th  Session 13, Bayside C from 11:15 – 12:15 on</div>
<div></div>
<div>   Giving way 2 free copies of DB Optimizer at presentation ($4000 of software)</div>
<hr />
<p><a href="/wp-content/uploads/2013/06/MP900424435.jpg"><img class=" wp-image-3101 alignright" alt="Horse Racing at Track" src="/wp-content/uploads/2013/06/MP900424435.jpg" width="369" height="246" /></a><br />
On Wednesday 11:15  at <a href="http://kscope13.com/">ODTUG aka KSCOPE 2013</a> in New Orleans I&#8217;ll be giving away 2 copies of <a href="https://sites.google.com/site/embtdbo/">Embarcadero&#8217;s DB Optimizer</a> which automates SQL tuning analysis as presented in the book <a href="http://www.amazon.com/SQL-Tuning-Dan-Tow/dp/0596005733">SQL Tuning by Dan Tow.</a></p>
<p>Dan Tow has developed  a step by step methodology to find an optimal execution plan for a SQL query.</p>
<p>The core of Dan&#8217;s SQL tuning methodology is based on a visual approach. The visual approach lays out the SQL query in a directed graph where direction is based on the parent child relation between tables. Given the directed graph layout and knowing which tables have predicate filters one can  quickly find the efficient paths that can be used to execute the query. One can solidify the analysis with information about the percent of rows return on tables with predicate filters and the join cardinalities between tables in the query. <span class="GINGER_SOFATWARE_correct">Embaradero&#8217;s</span> DB Optimizer does all of this analysis automatically.</p>
<ul>
<li>DB Optimizer&#8217;s <a href="/db-optimizer/">Visual SQL Tuning</a></li>
<li>Jonathan Lewis <a href="https://www.simple-talk.com/sql/performance/designing-efficient-sql-a-visual-approach/">writes about Visual SQL Tuning </a></li>
<li>Craig Martin&#8217;s<a href="http://www.cmartin2.com/presentations/SQLTuning.pdf"> presentation on how to use Dan Tow&#8217;s method </a></li>
</ul>
<p>On Wednesday at Kscope I&#8217;ll be giving a modified version of <a href="http://www.slideshare.net/khailey/12b-sqltuning-vst">these slides on slideshare</a>.</p>
<p>I&#8217;ll also be talking about database <span class="GINGER_SOFATWARE_correct">thin</span> cloning on database thin cloning and database <span class="GINGER_SOFATWARE_correct">virtualization</span></p>
<div><a href="http://kscope13.com/component/seminar/seminarslist#Delphix: Instant Database Cloning and Changing the Development Paradigm"><span class="GINGER_SOFATWARE_noSuggestion GINGER_SOFATWARE_correct">Delphix</span>: Instant Database Cloning and Changing the Development Paradigm</a></div>
<div>   Tuesday, Jun 25, 2013, Session 7 ,  9:45 am &#8211; 10:45 am</div>
<div></div>
<div><a href="http://kscope13.com/component/seminar/seminarslist#SQL Tuning Methodology for Developers">SQL Tuning Methodology</a></div>
<div>   Wednesday, June 26th  Session 13, Bayside C from 11:15 &#8211; 12:15 on</div>
<p style="text-align: center;"><a href="/wp-content/uploads/2013/06/headerorange.jpg"><img class="aligncenter  wp-image-3104" alt="headerorange" src="/wp-content/uploads/2013/06/headerorange.jpg" width="576" height="96" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://dboptimizer.com/2013/06/24/kscope-2013-win-db-optimizer-license-at-sql-tuning-presentation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Webcast June 19th: Jonathan Lewis – Expert Look at Delphix</title>
		<link>http://dboptimizer.com/2013/06/12/webcast-june-19th-jonathan-lewis-expert-look-at-delphix-2/</link>
		<comments>http://dboptimizer.com/2013/06/12/webcast-june-19th-jonathan-lewis-expert-look-at-delphix-2/#comments</comments>
		<pubDate>Wed, 12 Jun 2013 21:59:28 +0000</pubDate>
		<dc:creator>Kyle Hailey</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dboptimizer.com/?p=3058</guid>
		<description><![CDATA[Live webcast: Jonathan Lewis – An Oracle Expert’s Look at the Delphix Technology Date: Wednesday, June 19 @ 9am PT Click Here to Register Jonathan Lewis joins us for the 2nd webcast of 3 in his series on Delphix technology and his experiences. Jonathan came out to the Delphix offices in California in March and kicked the [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><strong><a href="/wp-content/uploads/2013/06/MP900431702.jpg"><img class=" wp-image-3061 alignright" alt="Concept of Hand with Electronic Fingerprints" src="/wp-content/uploads/2013/06/MP900431702.jpg" width="461" height="307" /></a>Live webcast:</strong> Jonathan Lewis – An Oracle Expert’s Look at the Delphix Technology<strong><br />
Date: </strong>Wednesday, June 19 @ 9am PT<br />
<a href="http://mkto-i0087.com/track?type=click&amp;enid=bWFpbGluZ2lkPWRlbHBoaXhCZXRhY3VzdC0xNjAwLTI3NzMtMC0xNzg1LXByb2QtMTAyMyZtZXNzYWdlaWQ9MCZkYXRhYmFzZWlkPTEwMjMmc2VyaWFsPTEyNjU2MzY2MjkmZW1haWxpZD1reWxlLmhhaWxleUBkZWxwaGl4LmNvbSZ1c2VyaWQ9MjE2NzI5JmV4dHJhPSYmJg==&amp;&amp;&amp;https://delphixevents.webex.com/delphixevents/onstage/g.php?t=a&amp;d=663113969&amp;mkt_tok=3RkMMJWWfF9wsRonvazJZKXonjHpfsX66uoqW66g38431UFwdcjKPmjr1YIGRMd0dvycMRAVFZl5nQhdFvCddZg%3D" target="_blank">Click Here to Register<br />
</a></p>
<p>Jonathan Lewis joins us for the 2nd webcast of 3 in his series on Delphix technology and his experiences. Jonathan came out to the Delphix offices in California in March and kicked the tires on the product for a few days and had a chance to talk to some of the creators of Delphix, ZFS, DTrace and Active Dataguard at the Delphix offices.</p>
<p>The first webcast was an informal discussion of his experiences. This second webcast will also be informal but more technical.</p>
<p>Please send us questions by commenting on this blog post and we will try to incorporate the questions into the webcast</p>
<p>Some of the areas we may talk about are</p>
<p>Introduction</p>
<ul>
<li>motivation for virtualizing databases covering some use cases that database virtualization solves.</li>
</ul>
<p>Ease of Use of Delphix</p>
<ul>
<li>link to a source database</li>
<li>provision a virtual database clone</li>
<li>eadministration automates of change collection and purging of old data.</li>
</ul>
<p>Delphix on a laptop</p>
<ul>
<li>Jonathan and I have set up Delphix on our laptops and we will discuss a bit on how this has worked for us.</li>
<li>Demo of Delphix (either on laptop or on a “real” machine”)</li>
</ul>
<p>Technical explanations</p>
<p>ZFS</p>
<ul>
<li>ZFS “Keeps a copy of every new version of a block”</li>
<li>ZFS equivalent of the read-consistent index  that gives you the file as at any point in time</li>
<li>Awareness of Oracle block size – setting logical ZFS block size to Oracle block size</li>
<li>Being able to compress the ZFS logical block to a smaller number of sectors</li>
<li>Special case of empty blocks compressing to fit the ZFS meta-data entry</li>
</ul>
<p>Source database linking</p>
<ul>
<li>RMAN full backup run  by delphix</li>
<li>Delphix uses RMAN tape library APIs</li>
<li>RMAN backup from SCN</li>
<li>Allows consistent versions of database for EVERY incremental backup taken, forever</li>
<li>Enable ctwr  (block change tracking) to minimise backup times</li>
<li>Ability to copy all redo logs, and keep up with online redo logs  so able to start from any level 1 and roll forward to any point before next level 1</li>
<li>How old versions of data blocks from the backup history can be dropped when there are no snapshots that depend on them so that the backup keeps rolling forward in time without needing a whole new starting snapshot to be taken</li>
<li>The complexity of making this task efficient</li>
<li>The importance and benefit of being able to do it.</li>
</ul>
<p>Virtual Database</p>
<ul>
<li>Creating a vDB and how the new data is created without a history trail and unchanged datablocks come from a snapshot and are mostly the original backups.</li>
</ul>
<p>Related blog posts by Jonathan’s blog</p>
<ul>
<li><a href="http://jonathanlewis.wordpress.com/2013/02/06/delphix/">http://jonathanlewis.wordpress.com/2013/02/06/delphix/ </a>- intro to visit at Delphix</li>
<li><a href="http://jonathanlewis.wordpress.com/2013/03/22/delphix-debrief/">http://jonathanlewis.wordpress.com/2013/03/22/delphix-debrief/</a> – debrief from visit Delphix</li>
<li><a href="http://jonathanlewis.wordpress.com/2013/03/09/virtual-db/">http://jonathanlewis.wordpress.com/2013/03/09/virtual-db/</a> – EMC vs NetApp</li>
<li><a href="http://jonathanlewis.wordpress.com/2013/04/04/delphix-overview/">http://jonathanlewis.wordpress.com/2013/04/04/delphix-overview/</a> – write up on experiences with Delphix</li>
<li><a href="http://jonathanlewis.wordpress.com/2013/06/18/delphix-2/">http://jonathanlewis.wordpress.com/2013/06/18/delphix-2/</a> - annouces 2nd webcast</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://dboptimizer.com/2013/06/12/webcast-june-19th-jonathan-lewis-expert-look-at-delphix-2/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Colored Heat Maps in  SQL*Plus</title>
		<link>http://dboptimizer.com/2013/05/10/colored-heat-maps-in-sqlplus/</link>
		<comments>http://dboptimizer.com/2013/05/10/colored-heat-maps-in-sqlplus/#comments</comments>
		<pubDate>Fri, 10 May 2013 21:25:00 +0000</pubDate>
		<dc:creator>Kyle Hailey</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dboptimizer.com/?p=2856</guid>
		<description><![CDATA[The above is so cool. The graphic shows the latency heatmap of &#8220;log file sync&#8221;. I was running a swingbench load and at the same time throttling I/O such that latencies started off good then got worse and then back to normal. All I did was type sqlplus / as sysdba @OraLatencyMap_event 3 "log file [&#8230;]]]></description>
				<content:encoded><![CDATA[<p style="text-align: center;"><a href="/wp-content/uploads/2013/05/Screen-Shot-2013-05-10-at-1.13.15-PM.png"><img class="aligncenter  wp-image-2857" alt="Screen Shot 2013-05-10 at 1.13.15 PM" src="/wp-content/uploads/2013/05/Screen-Shot-2013-05-10-at-1.13.15-PM.png" width="530" height="362" /></a></p>
<p style="text-align: left;">The above is so cool.</p>
<p style="text-align: left;">The graphic shows the latency heatmap of &#8220;log file sync&#8221;. I was running a swingbench load and at the same time throttling I/O such that latencies started off good then got worse and then back to normal.</p>
<p style="text-align: left;">All I did was type</p>
<pre style="padding-left: 30px;">sqlplus / as sysdba
@OraLatencyMap_event 3 "log file sync"</pre>
<p>This was created by <a id="___hovercard_0" href="http://www.blogger.com/profile/06252662329568134677" rel="author" data-gapiscan="true" data-onload="true" data-gapiattached="true">Luca Canali</a> , see <a href="http://externaltable.blogspot.com/2013/05/latency-heat-map-in-sqlplus-with.html">http://externaltable.blogspot.com/2013/05/latency-heat-map-in-sqlplus-with.ht</a>m</p>
<p>Now if we combine this monitoring, with the I/O throttling documeted by Frits Hoogland here <a href="https://fritshoogland.wordpress.com/2012/12/15/throttling-io-with-linux/">https://fritshoogland.wordpress.com/2012/12/15/throttling-io-with-linux/</a> , we can really have some fun and even draw latency words:</p>
<p style="text-align: center;"><a href="http://dtrace.org/blogs/brendan/2009/03/17/heat-map-analytics/"><img class="aligncenter  wp-image-2858" alt="analytics-3-heatmaps-crop" src="/wp-content/uploads/2013/05/analytics-3-heatmaps-crop.png" width="335" height="326" /></a></p>
<div>
<div id="js-repo-pjax-container" data-pjax-container="">
<div id="slider">
<div data-permalink-url="/khailey/oraclelatencymap/blob/3ac743f6e3a3ed33186f55cf7b28ab6c4ed4de5d/readme.md" data-title="oraclelatencymap/readme.md at master · khailey/oraclelatencymap · GitHub" data-type="blob">
<div id="files">
<div id="readme">
<article itemprop="mainContentOfPage">The above words in latency heat maps are from  <a href="http://dtrace.org/blogs/brendan/2009/03/17/heat-map-analytics/">http://dtrace.org/blogs/brendan/2009/03/17/heat-map-analytics/</a> where there is information on heat maps.</article>
<article itemprop="mainContentOfPage" style="padding-left: 30px;"> </article>
<article itemprop="mainContentOfPage"></article>
<article itemprop="mainContentOfPage">In the graphic at the top of the page I put lgwr in an I/O write throttle group and played with the I/O throttle.</article>
<article itemprop="mainContentOfPage" style="padding-left: 30px;"> </article>
<article itemprop="mainContentOfPage">The full steps are:</article>
<article itemprop="mainContentOfPage" style="padding-left: 30px;"> </article>
</div>
</div>
</div>
</div>
</div>
</div>
<p>Run an auto refresh color coded heatmap on &#8220;log file sync&#8221; in sqlplus by typing</p>
<pre style="padding-left: 30px;">sqlplus / as sysdba
@OraLatencyMap_event 3 "log file sync"</pre>
<p>where <a href="https://github.com/khailey/oraclelatencymap/raw/master/OraLatencyMap_event.sql">OraLatencyMap_event.sql</a> and <a href="https://github.com/khailey/oraclelatencymap/raw/master/OraLatencyMap_internal.sql">OraLatencyMap_internal.sql</a> are  your current directory or sqlpath</p>
<p>Now to play with LGWR latency with cgroup throttles see</p>
<p><a href="https://fritshoogland.wordpress.com/2012/12/15/throttling-io-with-linux/">https://fritshoogland.wordpress.com/2012/12/15/throttling-io-with-linux/</a></p>
<pre># install cgroups on 2.6.24 LINUX or higher
yum intall cgroup

# setup /cgroup/blkio
grep blkio /proc/mounts || mkdir -p /cgroup/blkio ; mount -t cgroup -o blkio none /cgroup/blkio
cgcreate -g blkio:/iothrottle

# find the device you want
df -k
# my Oracle log file divice was
ls -l /dev/mapper/vg_source-lv_home
lrwxrwxrwx. 1 root root 7 May  1 21:42 /dev/mapper/vg_source-lv_home -&gt; ../dm-2

# my device points to /dev/dm-2
ls -l /dev/dm-2
brw-rw----. 1 root disk 253, 2 May  1 21:42 /dev/dm-2

# my device  major and minor numbers are "253, 2"
# create a write throtte on this device (for read just replace "write" with "read"
# this limits it to 10 writers per second
cgset -r blkio.throttle.write_iops_device="253:2 10" iothrottle

# look for lgwr
ps -ef | grep lgwr
oracle   23165     1  0 13:35 ?        00:00:19 ora_lgwr_o1123

# put lgwr pid into throttle group
echo 23165     &gt;  /cgroup/blkio/iothrottle/tasks

# now play with different throttles
cgset -r blkio.throttle.write_iops_device="253:2 1" iothrottle
cgset -r blkio.throttle.write_iops_device="253:2 10" iothrottle
cgset -r blkio.throttle.write_iops_device="253:2 100" iothrottle
cgset -r blkio.throttle.write_iops_device="253:2 1000" iothrottle

# if you are finished then delete the throttle control group
cgdelete  blkio:/iothrottle</pre>
]]></content:encoded>
			<wfw:commentRss>http://dboptimizer.com/2013/05/10/colored-heat-maps-in-sqlplus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>May 22, 2013: Full day of Oracle hands on labs, free!  (bay area)</title>
		<link>http://dboptimizer.com/2013/05/01/may-22-2013-full-day-of-oracle-hands-on-labs-free-bay-area/</link>
		<comments>http://dboptimizer.com/2013/05/01/may-22-2013-full-day-of-oracle-hands-on-labs-free-bay-area/#comments</comments>
		<pubDate>Wed, 01 May 2013 17:35:39 +0000</pubDate>
		<dc:creator>Kyle Hailey</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dboptimizer.com/?p=2849</guid>
		<description><![CDATA[Oracle OTN is hosting a full day of  free*  hands on Oracle labs on May 22, 2013 in Pleasanton, Ca Re-engineering Your Database Using Oracle SQL Developer Data Modeler 3.1 Learn how to use SQL Developer Data Modeler to import your database schema, make changes and generate the modified DDL. Testing and Debugging Procedures using [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><a href="/wp-content/uploads/2013/05/MH900400379.jpg"><img class="aligncenter size-full wp-image-2852" alt="MH900400379" src="/wp-content/uploads/2013/05/MH900400379.jpg" width="325" height="325" /></a>Oracle OTN is hosting a full day of  free*  hands on Oracle labs on May 22, 2013 in Pleasanton, Ca</p>
<ul>
<li><a href="http://www.technicalconferencesolutions.com/pls/caat/caat_abstract_reports.display_presenter_abstract?conference_id=124&amp;presenter_id=21&amp;abstract_id=656620" target="abstract"><b>Re-engineering Your Database Using Oracle SQL Developer Data Modeler 3.1</b></a>
<ul>
<li>Learn how to use SQL Developer Data Modeler to import your database schema, make changes and generate the modified DDL.</li>
</ul>
</li>
<li><a href="http://www.technicalconferencesolutions.com/pls/caat/caat_abstract_reports.display_presenter_abstract?conference_id=124&amp;presenter_id=21&amp;abstract_id=656621" target="abstract"><b>Testing and Debugging Procedures using SQL Developer 3.1</b></a>
<ul>
<li>Learn how to use Application Express to load data into your database, create an application with a variety of page types (including a interactive report, calendar and data load wizard).</li>
</ul>
</li>
<li><b><a href="http://www.technicalconferencesolutions.com/pls/caat/caat_abstract_reports.display_presenter_abstract?conference_id=124&amp;presenter_id=21&amp;abstract_id=656622" target="abstract">Building an Application using Oracle Application Express: Part 1 and part 2</a><br />
</b></p>
<ul>
<li>Learn how to use Application Express to load data into your database, create an application with a variety of page types (including a interactive report, calendar and data load wizard).</li>
</ul>
</li>
</ul>
<p>Learn rapid application development (RAD) with Oracle tools. Veteran OTN instructor David Peake will lead an end-to-end, soup-to-nuts session on using Data Modeler to design a database, SQL Developer to build tables, and Application Express to build a web-based application. Attendees must bring their own laptop containing the Developer Day virtual machine from<a href="http://goo.gl/cvBo8" target="_blank">http://goo.gl/cvBo8</a>. AEach session in this track builds upon the previous session so please plan on attending all four sessions in this track.</p>
<p>To participate in the labs you have to be a member of NoCOUG but for a limited time  we are offering a limited number of free one day passes to this special OTN event. Please contact me at kyle.hailey@delphix.com if you are not a member of NoCOUG but would like to attend the OTN labs. If you are already a member of  NoCOUG and would like to attend the lab sessions, <a href="http://www.nocoug.org/rsvp.html">register here</a>.</p>
<p><a href="http://www.nocoug.org/rsvp.html"><img class="aligncenter size-full wp-image-2829" alt="register" src="/wp-content/uploads/2013/04/register.png" width="158" height="61" /></a></p>
<p>Not only will there be a full day of OTN labs but there will be <a href="http://www.technicalconferencesolutions.com/pls/caat/caat_abstract_reports.schedule?conference_id=124">awesome talks by renown Oracle speakers</a>.</p>
<p>If you are a DBA type you may be thinking &#8220;why should I attend the OTN labs?&#8221; My response would be: Why broaden your horizons? Why get out of your comfort zone? Why learn new skills? Why bother taking advantage of the magnificent educational smorgasbord that we call NoCOUG? When ever I have the chance I try and learn new skills. One never knows what tomorrow will bring and having a wide array of skills will allow me to grow into new areas that prove in more demand or more interesting.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://dboptimizer.com/2013/05/01/may-22-2013-full-day-of-oracle-hands-on-labs-free-bay-area/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing OEM for second instance</title>
		<link>http://dboptimizer.com/2013/04/21/installing-oem-for-second-instance/</link>
		<comments>http://dboptimizer.com/2013/04/21/installing-oem-for-second-instance/#comments</comments>
		<pubDate>Sun, 21 Apr 2013 14:52:14 +0000</pubDate>
		<dc:creator>Kyle Hailey</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dboptimizer.com/?p=2794</guid>
		<description><![CDATA[Had a machine running the default database from the Oracle 11.2.0.3 installer. This instance was called o1123. I then created a second database by hand (with crdb.sh for swingbench and slob tests) instead of dbca (maybe that was a mistake) and then I wanted to acccess OEM. The second instance was called SOE60G ( a [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Had a machine running the default database from the Oracle 11.2.0.3 installer. This instance was called o1123.<br />
I then created a second database by hand (with <a href="https://github.com/khailey/swingbenchsh/blob/master/shell_scripts/crdb.sh">crdb.sh</a> for <a href="http://www.dominicgiles.com/swingbench.html">swingbench</a> and <a href="http://www.pythian.com/blog/my-slob-io-testing-index/">slob</a> tests) instead of dbca (maybe that was a mistake) and then I wanted to acccess OEM. The second instance was called SOE60G ( a 60GB swingbench dataset database)</p>
<p>First tried to start up dbconsole:</p>
<pre>$ emctl start dbconsole
OC4J Configuration issue.
 /home/oracle/oracle1123/product/oc4j/j2ee/OC4J_DBConsole_perf234-target1.delphix.com_SOE60G 
<span style="color: #ff0000;">not found.
</span></pre>
<p>OK, missing file. EM wasn&#8217;t configured for this database, make sense. Let&#8217;s configure it</p>
<pre>$ emca -config dbcontrol db -repos create
...
<span style="color: #ff0000;">SEVERE: Dbcontrol Repository already exists.</span>  
Fix the error(s) and run EM Configuration Assistant again in standalone mode.</pre>
<p>Looks like there is already a repository, so lets configure EM with out making the repository</p>
<pre># emca -config dbcontrol db
<span style="color: #ff0000;">WARNING: ORA-00942: table or view does not exist</span>
SEVERE: The existing database you have specified has Grid Control repository. 
This operation is not supported.</pre>
<p>Hmm, what table is missing? Put db in sql trace mode to see what SQL statement ran into the 942 error</p>
<pre>sqlplus / as sysdba
alter database set sql_trace=true
exit</pre>
<p>rerun and grep for 942 in trace files in user_dump_dest</p>
<pre>cd /home/oracle/oracle1123/diag/rdbms/soe60g/SOE60G/trace
grep 942 *</pre>
<p>this show a dozen or so files.<br />
Open each one up and searched for 942 and found two distinct SQL queries:</p>
<pre>SELECT ATTRIBUTE,SCOPE,NUMERIC_VALUE,CHAR_VALUE,DATE_VALUE FROM <span style="color: #ff0000;"><strong>SYSTEM.PRODUCT_PRIVS</strong></span>
WHERE (UPPER('SQL*Plus') LIKE UPPER(PRODUCT)) AND (USER LIKE USERID)

select count(*) from <span style="color: #ff0000;"><strong>sysman.mgmt_versions</strong></span> where status &gt; 0 and component_mode
like 'SYSAUX' and component_name in ('DB','CORE')</pre>
<p>The first table is from not having run $ORACLE_HOME/sqlplus/admin/pupbld.sql<br />
Second is the problem emca was running into. Let&#8217;s look at sysman&#8217;s objects and see what&#8217;s there.</p>
<pre>sqlplus sysman/sys
select object_name from user_objects;
-&gt; no rows returned</pre>
<p>OK, sysman looks empty , let&#8217;s drop it and recreated it</p>
<pre>sqlplus / as sysdba
drop user sysman cascade;
drop user MGMT_VIEW cascade;</pre>
<p>someone&#8217;s blog had suggested dropping the following but I didn&#8217;t</p>
<pre># drop role MGMT_USER;
# drop public synonym MGMT_TARGET_BLACKOUTS;
# drop public synonym SETEMVIEWUSERCONTEXT;
#                                                        host      port  SID
# $ORACLE_HOME/sysman/admin/emdrep/bin/RepManager antarctic 2483 sprod -action drop
# ./emca -repos create</pre>
<p>rerun emca</p>
<pre>$ emca -config dbcontrol db -repos create
....
Do you wish to continue? [yes(Y)/no(N)]: y
Apr 20, 2013 7:27:51 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at 
/home/oracle/oracle1123/cfgtoollogs/emca/SOE60G/emca_2013_04_20_07_27_38.log.
Apr 20, 2013 7:27:51 AM oracle.sysman.emcp.ParamsManager checkListenerStatusForDBControl
<span style="color: #ff0000;">WARNING: ORA-01031: insufficient privileges</span>
Apr 20, 2013 7:27:51 AM oracle.sysman.emcp.EMConfig perform
SEVERE:
Database connection through listener failed. Fix the error and run EM Configuration Assistant again.
Some of the possible reasons may be:
1) Listener port 1521 provided is incorrect. Provide the correct port.
2) Listener is not up. Start the Listener.
3) Database service SOE60G is not registered with listener. Register the database service.
4) Listener is up on physical host and ORACLE_HOSTNAME environment variable is set to
 virtual host. Unset ORACLE_HOSTNAME environment variable.
5) Listener is up on virtual host. Set environment variable ORACLE_HOSTNAME=&lt;virtual host&gt;.
6) /etc/hosts does not have correct entry for hostname.</pre>
<p>Notice the ORA-01031. Hmm, I can connect as sqlplus / as sysdba but connecting as sysdba through the listener requires a password file.  Let&#8217;s see if password files are set up</p>
<pre>sqlplus / as sysdba
show parameters remote_login_passwordfile
remote_login_passwordfile            string      EXCLUSIVE</pre>
<p>that&#8217;s set correct, but is there a password file?</p>
<pre>cd $ORACLE_HOME/dbs
ls orapw$ORACLE_SID
ls: cannot access orapwdSOE60G: No such file or directory</pre>
<p>not there, let&#8217;s create it</p>
<pre>orapwd FILE=orapw$ORACLE_SID ENTRIES=30</pre>
<p>now emca works !</p>
<p>Now what URL to I use to access OEM for the second database?<br />
It&#8217;s the same URL as the first database but with different port. We can find the ports for each database in the following file</p>
<pre>cat $ORACLE_HOME/install/portlist.ini
Enterprise Manager Console HTTP Port (o1123) = 1158
Enterprise Manager Agent Port <span style="color: #ff0000;">(o1123) = 3938</span>
Enterprise Manager Console HTTP Port (SOE60G) = 5500
Enterprise Manager Agent Port <span style="color: #ff0000;">(SOE60G) = 1830</span></pre>
<p><strong><span style="text-decoration: underline;">Post script</span></strong></p>
<p>After the above steps, one of the bizarre things I ran into was being able to  access OEM database page in Chrome but nothing else. Coming into OEM, I&#8217;m first asked for a login. I login as system, I see the database home page, then if I click on the performance tab, then I get prompted for the login again. I then  login again, and I&#8217;m back at the database home page. No matter what tab I click, I end up back at the database home page after giving login credentials.<br />
In Firefox, though once I login, I can go to any of the other tabs and it works!</p>
<p>&nbsp;</p>
<p>PS when running emca above I was prompted for a number of variables.  didn&#8217;t try this, but looks like all the arguments can be given in the command line</p>
<pre>emca -repos create -silent -ORACLE_HOSTNAME perf234-target1 -SID SOE60G 
-SERVICE_NAME SOE60G -ORACLE_HOME /home/oracle/oracle1123/product
 -SYS_PWD sys -DBSNMP_PWD sys -SYSMAN_PWD sys 
-HOST_USER oracle -HOST_USER_PWD  -PORT 1521</pre>
<p><strong> Post Script II:</strong></p>
<p>Never seen this one before and it was super annoying. I set up a VM in Virtual Box on my Mac with LINUX and Oracle 11.2.0.3 and OEM. On the VM I could access OEM but not from my Mac. On my Mac I kept getting</p>
<h1 style="padding-left: 30px;">This webpage is not available</h1>
<div id="errorSummary" style="padding-left: 30px;">The connection to <strong>192.168.1.138</strong> was interrupted.</div>
<div></div>
<div>Turns out the problem was that I was using &#8220;http://&#8221; and not &#8220;https://&#8221; , rrr</div>
<div></div>
<p>references</p>
<ul>
<li><a title="http://dbataj.blogspot.com/2011/09/severe-dbcontrol-repository-already.html" href="http://dbataj.blogspot.com/2011/09/severe-dbcontrol-repository-already.html">http://dbataj.blogspot.com/2011/09/severe-dbcontrol-repository-already.html</a></li>
<li><a title="http://sheltong-appsdba.blogspot.com/2010/07/configuring-em-on-oracle-11g.html" href="http://sheltong-appsdba.blogspot.com/2010/07/configuring-em-on-oracle-11g.html">http://sheltong-appsdba.blogspot.com/2010/07/configuring-em-on-oracle-11g.html</a></li>
<li><a title="https://forums.oracle.com/forums/thread.jspa?threadID=1773883" href="https://forums.oracle.com/forums/thread.jspa?threadID=1773883">https://forums.oracle.com/forums/thread.jspa?threadID=1773883</a></li>
</ul>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://dboptimizer.com/2013/04/21/installing-oem-for-second-instance/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Join Me at COLLABORATE 13</title>
		<link>http://dboptimizer.com/2013/04/05/join-me-at-collaborate-13/</link>
		<comments>http://dboptimizer.com/2013/04/05/join-me-at-collaborate-13/#comments</comments>
		<pubDate>Fri, 05 Apr 2013 04:31:10 +0000</pubDate>
		<dc:creator>Kyle Hailey</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dboptimizer.com/?p=2752</guid>
		<description><![CDATA[I&#8217;ll be speaking on Mon, Wednesday and Thursday: Boosting performance on reporting and development databases April 8, 2:30-3:30pm (Mile High Ballroom 2B) Database virtualization: accelerating application development April 10,1:00-2:00pm (Mile High Ballroom 2B) NFS tuning for Oracle April 11, 8:30-9:30am (Mile High Ballroom 3A) Attend COLLABORATE online IOUG Forum for the Best in User-Driven Oracle [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><a href="/wp-content/uploads/2013/04/5-COLLABORATE-13-Banner-Ad.jpg"><img class="aligncenter size-full wp-image-2753" alt="#5 COLLABORATE 13 Banner Ad" src="/wp-content/uploads/2013/04/5-COLLABORATE-13-Banner-Ad.jpg" width="468" height="60" /></a></p>
<p>I&#8217;ll be speaking on Mon, Wednesday and Thursday:</p>
<ul>
<li>Boosting performance on reporting and development databases<br />
April 8, 2:30-3:30pm (Mile High Ballroom 2B)</li>
<li>Database virtualization: accelerating application development<br />
April 10,1:00-2:00pm (Mile High Ballroom 2B)</li>
<li>NFS tuning for Oracle<br />
April 11, 8:30-9:30am (Mile High Ballroom 3A)</li>
</ul>
<p><a href=" http://collaborate13.ioug.org/p/cm/ld/fid=235">Attend COLLABORATE online</a></p>
<p><b> IOUG Forum for the Best in User-Driven Oracle Education and Networking</b></p>
<p>Have you made your Oracle training plans for 2013? As an IOUG RUG leader, I’d like to extend a personal invitation to the conference that I continue to attend for truly valuable personal and professional growth- COLLABORATE 13 – IOUG Forum, April 7-11 at the Colorado Convention Center in Denver, CO.</p>
<p>COLLABORATE is interactive: have your most difficult questions answered by other IOUG Oracle experts who’ve been there and come out swinging.</p>
<p>COLLABORATE is diverse: attend education sessions across all of the tracks offered at IOUG Forum, or pick the one that fits you best! Choose from Database, Business Intelligence, Big Data, Exadata, Security and more!</p>
<p>COLLABORATE is personal: tap into the shared resources of hundreds of IOUG members, Oracle ACEs and more! Meet new friends and contacts throughout the week and strengthen ties with existing business partners.</p>
<p>COLLABORATE is an awesome big conferences of over 6000 attendees with many opportunities to network, learn new technology and see what is happening in the industry.</p>
<p>By registering specifically with IOUG for COLLABORATE 13, you’ll reap the following benefits:</p>
<ul>
<li><b>Pre-Conference Workshops</b><br />
On Sunday, April 7, IOUG offers an extra, comprehensive day of Oracle training complimentary for IOUG Forum attendees.</li>
<li><b>IOUG Curricula</b><br />
The IOUG Curricula are designed to give well-rounded training and education on specialized topics, chosen by peers, throughout COLLABORATE.</li>
<li><b>IOUG IT Strategic Leadership Package</b><br />
Get the chance to discuss corporate strategy with senior IT management and improve your skills at influencing without authority, present business cases and help develop business solutions for your company.</li>
</ul>
<ul>
<li><b>Access to hands-on labs</b><br />
Sessions on <b><b>Upgrade to the Latest Generation of Oracle Database and Consolidate your Databases Using Best Practices, Hacking, Cracking, Attacking – OH MY! and RAC Attack.</b></b></li>
<li><b>Networking</b><br />
Admission to IOUG&#8217;s exclusive networking activities, including our Sunday evening reception</li>
<li><b>Conference Proceedings</b><br />
Online access to conference proceedings before, during and after the event</li>
</ul>
<p>You will also be able to attend education sessions offered by the OAUG and Quest user groups with your COLLABORATE 13 registration through the IOUG. Make plans to join me and thousands of your Oracle peers to soak in the solutions at this unique Oracle community event.</p>
<p>If you are an Oracle technology professional, be sure to secure your registration through the <a href="http://www.ioug.org/">IOUG</a> to obtain exclusive access to IOUG offerings.</p>
<p>Please contact  IOUG headquarters at <a href="mailto:ioug@ioug.org">ioug@ioug.org</a> if you have any questions.</p>
<p>I hope to see you in Denver!</p>
<p>Best Regards,</p>
<p>Kyle Hailey</p>
]]></content:encoded>
			<wfw:commentRss>http://dboptimizer.com/2013/04/05/join-me-at-collaborate-13/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Where to begin with Oracle and SQL</title>
		<link>http://dboptimizer.com/2013/03/22/where-begin-with-oracle-and-sql/</link>
		<comments>http://dboptimizer.com/2013/03/22/where-begin-with-oracle-and-sql/#comments</comments>
		<pubDate>Fri, 22 Mar 2013 04:16:30 +0000</pubDate>
		<dc:creator>Kyle Hailey</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dboptimizer.com/?p=2650</guid>
		<description><![CDATA[Seeing more and more questions on &#8220;where do I start with Oracle if I want to be a DBA?&#8221;  My perspective is a bit off since I&#8217;ve been surrounded by Oracle for over 20 years.  I hardly remember what it was like to start with Oracle and starting with Oracle now in 2013 is quite [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><img class="alignright" alt="" src="http://officeimg.vo.msecnd.net/en-us/images/MH900422560.jpg" width="325" height="325" />Seeing more and more questions on &#8220;where do I start with Oracle if I want to be a DBA?&#8221;  My perspective is a bit off since I&#8217;ve been surrounded by Oracle for over 20 years.  I hardly remember what it was like to start with Oracle and starting with Oracle now in 2013 is quite different than starting with Oracle in 1990.</p>
<p>Here is my list and everything on this list is excellent. I&#8217;m sure I missed a few good ones, but maybe people can add them in the comments.</p>
<p>Start with Oracle Docs, they are free and good!</p>
<ul>
<li><a href=" http://www.oracle.com/pls/db112/homepage"> http://www.oracle.com/pls/db112/homepage</a></li>
</ul>
<p>Get the best books and read them</p>
<ul>
<li><a href="http://www.amazon.com/Expert-Oracle-Database-Architecture-Programming/dp/1430229462/ref=sr_1_1?ie=UTF8&amp;qid=1363884819&amp;sr=8-1&amp;keywords=Expert+Oracle+Database+Architecture+by+Thomas+Kyte">Expert Oracle Database Architecture by Thomas Kyte</a></li>
<li><a href="http://www.amazon.com/Troubleshooting-Oracle-Performance-Christian-Antognini/dp/1590599179/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1363884842&amp;sr=1-1&amp;keywords=Troubleshooting+Oracle+Performance+by+Christian+Antognini">Troubleshooting Oracle Performance by Christian Antognini</a></li>
<li><a href="http://www.amazon.com/Refactoring-SQL-Applications-Stephane-Faroult/dp/0596514972/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1363884885&amp;sr=1-1&amp;keywords=Refactoring+SQL+Applications+by+Stephane+Faroult">Refactoring SQL Applications by Stephane Faroult</a></li>
</ul>
<p>A bit old, but this is a great overview of Oracle: <a href="http://www.amazon.com/Practical-Oracle8i%C2%BF-Building-Efficient-Databases/dp/0201715848/ref=sr_1_3?s=books&amp;ie=UTF8&amp;qid=1363885138&amp;sr=1-3&amp;keywords=jonathan+lewis+oracle">Practical Oracle 8i by Jonathan Lewis</a></p>
<p>After you have read the above, dive into the important details:</p>
<ul>
<li><a href="http://www.amazon.com/Optimizing-Oracle-Performance-Cary-Millsap/dp/059600527X/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1363884911&amp;sr=1-1&amp;keywords=Optimizing+Oracle+Performance+by+Cary+Milsaphttp://">Optimizing Oracle Performance by Cary Milsap</a></li>
<li><a href="http://www.amazon.com/Oracle-Core-Essential-Internals-Developers/dp/B008KWS8CM/ref=sr_1_sc_2?s=books&amp;ie=UTF8&amp;qid=1363884934&amp;sr=1-2-spell&amp;keywords=Oracle+Core+Essential+Internals+by+Jonathan+Lewi">Oracle Core Essential Internals by Jonathan Lewis</a></li>
<li><a href="http://www.amazon.com/Oracle-Wait-Interface-Performance-Diagnostics/dp/007222729X/ref=sr_1_fkmr0_1?s=books&amp;ie=UTF8&amp;qid=1363884991&amp;sr=1-1-fkmr0&amp;keywords=Oracle+Wait+Interface+by+R+Shee">Oracle Wait Interface by R Shee, K Deshpande, K. Gopalakrishnan</a></li>
</ul>
<p>If you know SQL but want to get great at SQL performance, read these books</p>
<ul>
<li><a href="http://www.amazon.com/Cost-Based-Oracle-Fundamentals-Experts-Voice/dp/1590596366/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1363885014&amp;sr=1-1&amp;keywords=Cost-Based+Oracle+Fundamentals+by+Jonathan+Lewis">Cost-Based Oracle Fundamentals by Jonathan Lewis</a></li>
<li><a href="http://www.amazon.com/SQL-Tuning-Dan-Tow/dp/0596005733/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1363885041&amp;sr=1-1&amp;keywords=sql+tuning+by+dan+tow">SQL Tuning by Dan Tow</a></li>
<li><a href="http://www.amazon.com/Relational-Database-Index-Design-Optimizers/dp/0471719994/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1363885060&amp;sr=1-1&amp;keywords=Relational+Database+Index+Design+and+the+Optimizers+by+Tapio+Lahdenmaki">Relational Database Index Design and the Optimizers by Tapio Lahdenmaki</a></li>
</ul>
<p>Join Online discussions and follow blogs</p>
<ul>
<li>Oracle-L forum: <a href="www.freelists.org/list/oracle-l">www.freelists.org/list/oracle-l</a></li>
<li>OTN forums: <a href="https://forums.oracle.com/forums">https://forums.oracle.com/forums</a></li>
<li>Oaktable blogs: <a href="http://www.oaktable.net/oakienews">http://www.oaktable.net/oakienews</a></li>
</ul>
<p>Create your own Oracle blog aggregator, here is mine: <a href="http://oracle.collected.info/">http://oracle.collected.info/</a></p>
<p>Go to conferences. First of all your local Oracle user groups and if you have the time and resources then go to the bigger conferences:</p>
<ul>
<li>Hotsos</li>
<li>RMOUG</li>
<li>UKOUG</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://dboptimizer.com/2013/03/22/where-begin-with-oracle-and-sql/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
