<?xml version="1.0" encoding="UTF-8"?>
<!--Generated by Squarespace Site Server v5.9.1 (http://www.squarespace.com/) on Wed, 10 Feb 2010 07:02:23 GMT--><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><title>Yet Another Database Blog</title><link>http://guyharrison.squarespace.com/blog/</link><description></description><lastBuildDate>Mon, 08 Feb 2010 22:58:17 +0000</lastBuildDate><copyright></copyright><language>en-US</language><generator>Squarespace Site Server v5.9.1 (http://www.squarespace.com/)</generator><item><title>Flash tablespace vs. DB Flash Cache</title><dc:creator>Guy Harrison</dc:creator><pubDate>Mon, 25 Jan 2010 00:34:30 +0000</pubDate><link>http://guyharrison.squarespace.com/blog/2010/1/24/flash-tablespace-vs-db-flash-cache.html</link><guid isPermaLink="false">359481:3851163:6421112</guid><description><![CDATA[<p>In this post I'm going to report on some performance comparisons I've recently conducted on using SSD flash storage for datafiles vs. using the new Oracle 11GR2 database flash cache. &nbsp;</p>
<p>It sometimes seems like I&rsquo;ve been waiting for the the end of the spinning magnetic disk all my professional &nbsp;life.&nbsp;&nbsp; The technology is so ancient, so clearly limited and (argh) <em>mechanical</em>.&nbsp; So the fact that Solid State Disk (SSD) is becoming more an more practical as a database storage medium - and directly supported by Oracle in 11GR2 - is very exciting. &nbsp;</p>
<p>Using SSD as part of database storage can certainly&nbsp;yield&nbsp;big results, but it's important to understand the performance characteristics of flash SSD and make sure we don't use it inappropriately.&nbsp;</p>]]></description><wfw:commentRss>http://guyharrison.squarespace.com/blog/rss-comments-entry-6421112.xml</wfw:commentRss></item><item><title>Best practices with Python and Oracle</title><dc:creator>Guy Harrison</dc:creator><pubDate>Sun, 17 Jan 2010 07:54:44 +0000</pubDate><link>http://guyharrison.squarespace.com/blog/2010/1/17/best-practices-with-python-and-oracle.html</link><guid isPermaLink="false">359481:3851163:6350209</guid><description><![CDATA[<p>This is the third in a series of postings outlining the basics of best practices when coding against Oracle in the various languages. &nbsp;In <a href="http://www.amazon.com/exec/obidos/ASIN/0137011954/flatwave-20">Oracle Performance Survival Guide </a>(and in it's predecessor <a href="http://www.amazon.com/exec/obidos/ASIN/0130123811/flatwave-20">Oracle SQL High Performance Tuning</a>) I emphasise the need to use bind variables and array processing when writing Oracle programs. &nbsp; The book provides examples of both in PL/SQL and Java, while these postings outline the techniques in other languages.&nbsp;</p>
<p>Previous postings covered <a href="http://guyharrison.squarespace.com/blog/2009/10/19/oracle-performance-programming-net.html">.NET languages</a> and <a href="http://guyharrison.squarespace.com/blog/2009/10/28/performant-oracle-programming-perl.html">perl</a>.&nbsp;</p>]]></description><wfw:commentRss>http://guyharrison.squarespace.com/blog/rss-comments-entry-6350209.xml</wfw:commentRss></item><item><title>Histograms of histograms</title><dc:creator>Guy Harrison</dc:creator><pubDate>Tue, 12 Jan 2010 01:08:39 +0000</pubDate><link>http://guyharrison.squarespace.com/blog/2010/1/11/histograms-of-histograms.html</link><guid isPermaLink="false">359481:3851163:6296987</guid><description><![CDATA[<p>&nbsp;</p>
<p>One of our TOAD customers asked us if we could show a chart of CBO histogram values so that they could observe the skew in column values. &nbsp; We don't currently, but will in an upcoming version of <a href="http://sqloptimizeroracle.inside.quest.com/index.jspa">SQL Optimizer</a> (part of <a href="http://www.quest.com/toad-dba-suite-for-oracle/">TOAD DBA</a> and <a href="http://www.quest.com/toad-development-suite-for-oracle/">Developer </a>suites). &nbsp;In the meantime, the idea of have an SQL that generated a histogram of a histogram seemed appealing, so here's some SQL to do that.&nbsp;</p>]]></description><wfw:commentRss>http://guyharrison.squarespace.com/blog/rss-comments-entry-6296987.xml</wfw:commentRss></item><item><title>The 11GR2 IGNORE_ROW_ON_DUPKEY_INDEX hint</title><dc:creator>Guy Harrison</dc:creator><pubDate>Fri, 01 Jan 2010 07:58:33 +0000</pubDate><link>http://guyharrison.squarespace.com/blog/2010/1/1/the-11gr2-ignore_row_on_dupkey_index-hint.html</link><guid isPermaLink="false">359481:3851163:6187805</guid><description><![CDATA[<p>One of the strangest new features in 11GR2 is the new IGNORE_ROW_ON_DUPKEY_INDEX hint. &nbsp;When this hint is applied to an INSERT statement, any duplicate key values that are inserted will be silently ignored, rather than raising an ORA-0001 statement.&nbsp;</p>
<p>Why is this strange? &nbsp;Mainly because unlike almost all other hints, this hint has a semantic effect - it changes the actual behavior - not the optimization of the SQL. &nbsp;In my opinion, clauses that affect the contents of the database should be contained in official SQL syntax, not embedded in a comment string as a "hint". &nbsp;The Oracle documentation acknowledges the uniqueness of the hint:</p>
<p class="notep1" style="padding-left: 30px;">Note:</p>
<p style="padding-left: 30px;">The&nbsp;<code>CHANGE_DUPKEY_ERROR_INDEX</code>,&nbsp;<code>IGNORE_ROW_ON_DUPKEY_INDEX</code>, and&nbsp;<code>RETRY_ON_ROW_CHANGE</code>&nbsp;hints are unlike other hints in that they have a semantic effect. The general philosophy explained in&nbsp;<a href="http://download.oracle.com/docs/cd/E11882_01/server.112/e10592/sql_elements006.htm#i35922">"Hints"</a>&nbsp;does not apply for these three hints.</p>
<p>&nbsp;Given all that, I'd be reluctant to use such a hint unless there was a compelling performance advantage. &nbsp;So, let's see if there's any performance&nbsp;justification&nbsp;for this&nbsp;strange&nbsp;hint.&nbsp;</p>]]></description><wfw:commentRss>http://guyharrison.squarespace.com/blog/rss-comments-entry-6187805.xml</wfw:commentRss></item><item><title>More on the database flash cache</title><dc:creator>Guy Harrison</dc:creator><pubDate>Tue, 01 Dec 2009 00:56:51 +0000</pubDate><link>http://guyharrison.squarespace.com/blog/2009/11/30/more-on-the-database-flash-cache.html</link><guid isPermaLink="false">359481:3851163:5951149</guid><description><![CDATA[<p>I'm eagerly awaiting my high-performance flash SSD (an Intel X-25 E), but in the meantime I've played a bit more with the database flash cache on the cheap hardware setup described in <a href="http://go2.wordpress.com/?id=725X1342&amp;site=jonathanlewis.wordpress.com&amp;url=http%3A%2F%2Fguyharrison.squarespace.com%2Fblog%2F2009%2F11%2F24%2Fusing-the-oracle-11gr2-database-flash-cache.html">my last post</a>. &nbsp; Sometimes it can be useful to test new features on slow hardware, since you see phenomenon that don't occur when everything is running full speed.</p>
<p>I&nbsp;originally&nbsp;naively&nbsp;imagined that blocks would be copied into the flash cache by the Oracle server process . &nbsp;Eg, that if I read from disk, I deposit the block in both the buffer cache or the flash cache. &nbsp;However, &nbsp;upon investigation it appears that blocks are moved from the buffer cache to the flash cache by the DBWR as they are about to be flushed from the buffer cache. &nbsp;</p>
<p>This is of course, a much better approach. &nbsp;The DBWR can write to the flash cache asynchronously, so that user sessions get the benefit - less time reading from magnetic disk - without having to wait while blocks are inserted into the flash cache.&nbsp;</p>
<p>&nbsp;</p>
<p>So the lifecycle of a block looks something like this:</p>]]></description><wfw:commentRss>http://guyharrison.squarespace.com/blog/rss-comments-entry-5951149.xml</wfw:commentRss></item><item><title>Using the Oracle 11GR2 database flash cache</title><dc:creator>Guy Harrison</dc:creator><pubDate>Tue, 24 Nov 2009 06:10:35 +0000</pubDate><link>http://guyharrison.squarespace.com/blog/2009/11/24/using-the-oracle-11gr2-database-flash-cache.html</link><guid isPermaLink="false">359481:3851163:5897618</guid><description><![CDATA[<p>Oracle just released a patch which allows you to use the database flash cache on Oracle Enterprise Linux even if you don't have exadata storage.&nbsp; The patch is the obscurely named:</p>
<ul>
<li>&nbsp;&nbsp; 8974084:META BUG FOR FLASH CACHE 11.2PL BUGS TO BACKPORT TO 11.2.0.1 OEL</li>
</ul>
<p>Once you install the patch you can use any old flash device as a database flash cache.&nbsp; Below I've documented some initial dabbling on a very old server and a cheap usb flash device.&nbsp;&nbsp; The results are not representative of the performance you'd get on quality hardware, but are still interesting, I think.</p>]]></description><wfw:commentRss>http://guyharrison.squarespace.com/blog/rss-comments-entry-5897618.xml</wfw:commentRss></item><item><title>Performant Oracle programming: perl</title><dc:creator>Guy Harrison</dc:creator><pubDate>Wed, 28 Oct 2009 06:07:47 +0000</pubDate><link>http://guyharrison.squarespace.com/blog/2009/10/28/performant-oracle-programming-perl.html</link><guid isPermaLink="false">359481:3851163:5637487</guid><description><![CDATA[<p>In the<a href="http://guyharrison.squarespace.com/blog/2009/10/19/oracle-performance-programming-net.html"> last installmen</a>t, we looked at the fundamentals of efficient Oracle programming with C#.&nbsp; In particular, we saw how to use bind variables and how to perform array processing.&nbsp; Now lets take a look at perl.</p>
<p>I have a strong affection for perl: &nbsp;I started using perl somewhere around 1992 and did some early hacking to allow the Oracle interface of the day - oraperl - to use stored procedures.&nbsp; My very first true performance monitoring tools were all written using perl. &nbsp;Perl has always had good support for Oracle and it's possible to write very efficient and powerful Oracle database utilities in perl.</p>
<p>You can get the perl program that implements the examples in this posting <a href="http://guyharrison.squarespace.com/storage/OraclePerlDemo2.pl">here</a>.&nbsp;</p>]]></description><wfw:commentRss>http://guyharrison.squarespace.com/blog/rss-comments-entry-5637487.xml</wfw:commentRss></item><item><title>Oracle performance programming: .NET</title><dc:creator>Guy Harrison</dc:creator><pubDate>Mon, 19 Oct 2009 05:14:52 +0000</pubDate><link>http://guyharrison.squarespace.com/blog/2009/10/19/oracle-performance-programming-net.html</link><guid isPermaLink="false">359481:3851163:5548243</guid><description><![CDATA[<p>In <a href="http://www.amazon.com/exec/obidos/ASIN/0130123811/flatwave-20">Oracle SQL High Performance tuning</a>, I included an appendix in which I outlined how to achieve good cursor management, bind variables and array processing in the major languages of the day. &nbsp; I had intended to do the same in <a href="http://www.amazon.com/gp/product/0137011954?tag=guyharswebbit-20">Oracle Performance Survival Guide</a>, but I ran out of time and space in the book. &nbsp;So the examples in the book are generally in Java or PL/SQL only.</p>
<p>I wanted to get up to date on the various languages, some of which (like Python) I haven't used for a while and others (Ruby for instance) I've never used with Oracle. &nbsp;So I thought I'd kill two birds with one stone by writing a series of blog posts on how to program efficiently in the various languages.</p>
<p>There's lots of best practices in each language, but I think most of us would agree that you at least need to know how to do the following:</p>
<ol>
<li>Use bind variables appropriately.</li>
<li>Ensure you are performing array fetch when retrieving more than one row</li>
<li>Ensure that you use array insert when doing bulk inserts&nbsp;</li>
</ol>
<p>The ways of doing this are different in each language. &nbsp;In Chapter 6 of <a href="http://www.amazon.com/gp/product/0137011954?tag=guyharswebbit-20">Oracle Performance Survival Guide</a>, &nbsp;I describe these techniques and their performance implications, using Java and sometimes PL/SQL examples. &nbsp;In this series I'll go through the techniques for other languages.&nbsp;</p>
<p>Let's start with ODP.NET, which is Oracle's ADO.NET driver for .NET languages such as C#, VB.NET and Powershell (see <a href="http://guyharrison.squarespace.com/blog/2008/1/28/accessing-oracle-from-powershell.html">here </a>for a posting on using Oracle with powershell).&nbsp;</p>]]></description><wfw:commentRss>http://guyharrison.squarespace.com/blog/rss-comments-entry-5548243.xml</wfw:commentRss></item><item><title>Oracle OpenWorld again!</title><dc:creator>Guy Harrison</dc:creator><pubDate>Thu, 08 Oct 2009 04:26:04 +0000</pubDate><link>http://guyharrison.squarespace.com/blog/2009/10/8/oracle-openworld-again.html</link><guid isPermaLink="false">359481:3851163:5427964</guid><description><![CDATA[<p>Along with tens of thousands of other Oracle-types, &nbsp;I'll shortly be in San Francisco for Oracle Open World 2009. &nbsp;This will be my 12th OOW! &nbsp; &nbsp;</p>
<p>We'll be giving away signed copies of <a href="http://www.amazon.com/gp/product/0137011954?tag=guyharswebbit-20">Oracle Performance Survival Guide</a> at the <a href="http://www.quest.com/events/8850/Quest-Booth-Location.pdf">Quest booth</a>&nbsp;(#335) on Wednesday October 14th at 1:30pm. &nbsp; I'll also be giving a few copies away at the two Oracle Develop presentations I'm giving:</p>
<p><span>- Session ID S308361: <a href="http://www20.cplan.com/cc221_new/session_details.jsp?isid=308361&amp;ilocation_id=221-1&amp;ilanguage=english">High Performance PL/SQL</a>&nbsp;&nbsp;Oct. 12, 5:30 p.m., Hilton&nbsp;Hotel, Golden Gate 6/7<br /><br />-&nbsp;Session ID S308362: <a href="http://www20.cplan.com/cc221_new/session_details.jsp?isid=308362&amp;ilocation_id=221-1&amp;ilanguage=english">Oracle Performance by Design</a>&nbsp;&nbsp;Oct. 13, 4 p.m., Hilton&nbsp;Hotel, Franciscan A/B</span></p>
<p>The rest of the time I'll be attending sessions and catching up with folk. &nbsp;If you'd like to try and catch me, either direct message me at <a href="http://www.twitter.com/guyharrison">@guyharrison</a> or email me at <a href="mailto:guy.a.harrison@gmail.com">guy.a.harrison@gmail.com</a>.&nbsp;</p>
<p>&nbsp;</p>]]></description><wfw:commentRss>http://guyharrison.squarespace.com/blog/rss-comments-entry-5427964.xml</wfw:commentRss></item><item><title>Oracle Performance Survival Guide available as PDF</title><dc:creator>Guy Harrison</dc:creator><pubDate>Mon, 05 Oct 2009 04:59:24 +0000</pubDate><link>http://guyharrison.squarespace.com/blog/2009/10/5/oracle-performance-survival-guide-available-as-pdf.html</link><guid isPermaLink="false">359481:3851163:5401173</guid><description><![CDATA[<p>My new book <a href="http://www.informit.com/store/product.aspx?isbn=0137000499">Oracle Performance Survival Guide</a> just became available for PDF download at <a href="http://www.informit.com/store/product.aspx?isbn=0137000499">Informit.com</a>!</p>
<p><span class="thumbnail-image-float-left ssNonEditable"><span><a href="javascript:showFullImage('/display/ShowImage?imageUrl=%2Fstorage%2Fopsg_from_web.png%3F__SQUARESPACE_CACHEVERSION%3D1254731250396',653,500);"><img style="width: 180px;" src="http://guyharrison.squarespace.com/storage/thumbnails/3844638-4345897-thumbnail.jpg?__SQUARESPACE_CACHEVERSION=1254731514613" alt="" /></a></span></span>The print version is available for pre-order at <a href="http://www.informit.com/store/product.aspx?isbn=0137011954">Informit </a>or <a href="http://www.amazon.com/gp/product/0137011954?tag=guyharswebbit-20">Amazon</a> and elsewhere, and is due in book stores on October 14th. &nbsp;There will be copies available at the Oracle Open World book store next week however and we'll be having a book signing with giveaways at the <a href="http://www.quest.com">Quest Software</a> booth, probably on Wednesday. &nbsp; I haven't seen a print copy myself yet, but I was probably the first to buy a digital copy :-). &nbsp; It will also soon be available on Kindle and on the Safari on-line bookshelf.&nbsp;</p>
<p>This is the most&nbsp;challenging&nbsp;book I've written, and the most extensive in terms of scope. &nbsp;I tried to write a book that would be accessible across a broad range of expertise, and which would systematically address most major aspects of Oracle RDBMS performance tuning. &nbsp;&nbsp;Overall, I'm satisfied that it's a worthwhile contribution to Oracle performance literature. &nbsp;&nbsp;</p>
<p>You can see the full table of contents at the books&nbsp;<a href="http://www.informit.com/store/product.aspx?isbn=0137011954">Informit </a>webpage, but here's the short chapter list to give you an idea: &nbsp;</p>
<p>&nbsp;</p>
<p>PART I: METHODS, CONCEPTS, AND TOOLS<br /><span style="white-space:pre"> </span>1 Oracle Performance Tuning: A Methodical Approach <span style="white-space:pre"> </span><br /><span style="white-space:pre"> </span>2 Oracle Architecture and Concepts <span style="white-space: pre;">&nbsp;</span><br /><span style="white-space:pre"> </span>3 Tools of the Trade <span style="white-space:pre"> </span><br /><br />PART II: APPLICATION AND DATABASE DESIGN<br /><span style="white-space:pre"> </span>4 Logical and Physical Database Design <span style="white-space:pre"> </span><br /><span style="white-space:pre"> </span>5 Indexing and Clustering <span style="white-space:pre"> </span><br /><span style="white-space:pre"> </span>6 Application Design and Implementation <span style="white-space:pre"> </span></p>
<p>PART III: SQL AND PL/SQL TUNING<br /><span style="white-space:pre"> </span>7 Optimizing the Optimizer <span style="white-space:pre"> </span><br /><span style="white-space:pre"> </span>8 Execution Plan Management <span style="white-space:pre"> </span><br /><span style="white-space:pre"> </span>9 Tuning Table Access <span style="white-space:pre"> </span><br /><span style="white-space:pre"> </span>10 Joins and Subqueries <span style="white-space:pre"> </span><br /><span style="white-space:pre"> </span>11 Sorting, Grouping, and Set Operations <span style="white-space:pre"> </span><br /><span style="white-space:pre"> </span>12 Using and Tuning PL/SQL <span style="white-space:pre"> </span><span style="white-space:pre"><br /></span><span style="white-space:pre"> </span>13 Parallel SQL <span style="white-space:pre"> </span><br /><span style="white-space:pre"> </span>14 DML Tuning <span style="white-space:pre"> </span></p>
<p>PART IV: MINIMIZING CONTENTION<br /><span style="white-space:pre"> </span>15 Lock Contention <span style="white-space: pre;">&nbsp;</span><br /><span style="white-space:pre"> </span>16 Latch and Mutex Contention <span style="white-space: pre;">&nbsp;</span><br /><span style="white-space:pre"> </span>17 Shared Memory Contention<span style="white-space:pre"> </span><br /><br />PART V: OPTIMIZING MEMORY<br /><span style="white-space:pre"> </span>18 Buffer Cache Tuning <span style="white-space: pre;">&nbsp;</span><br /><span style="white-space:pre"> </span>19 Optimizing PGA Memory <span style="white-space:pre"> </span><br /><span style="white-space:pre"> </span>20 Other Memory Management Topics <span style="white-space:pre"> </span></p>
<p>PART VI: IO TUNING AND CLUSTERING<br /><span style="white-space:pre"> </span>21 Disk IO Tuning Fundamentals <span style="white-space:pre"> </span><br /><span style="white-space:pre"> </span>22 Advanced IO Techniques <span style="white-space:pre"> </span><br /><span style="white-space:pre"> </span>23 Optimizing RAC <span style="white-space:pre"> </span></p>
<p>Scripts, examples and packages are available for download <a href="http://guyharrison.squarespace.com/opsgsamples/">here</a>.&nbsp;</p>]]></description><wfw:commentRss>http://guyharrison.squarespace.com/blog/rss-comments-entry-5401173.xml</wfw:commentRss></item></channel></rss>