<?xml version="1.0" encoding="UTF-8"?>
<!--Generated by Squarespace Site Server v5.8.3 (http://www.squarespace.com/) on Tue, 01 Dec 2009 12:30:16 GMT--><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rss="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:cc="http://web.resource.org/cc/"><rss:channel rdf:about="http://guyharrison.squarespace.com/blog/"><rss:title>Yet Another Database Blog</rss:title><rss:link>http://guyharrison.squarespace.com/blog/</rss:link><rss:description></rss:description><dc:language>en-US</dc:language><dc:date>2009-12-01T12:30:16Z</dc:date><admin:generatorAgent rdf:resource="http://www.squarespace.com/">Squarespace Site Server v5.8.3 (http://www.squarespace.com/)</admin:generatorAgent><rss:items><rdf:Seq><rdf:li rdf:resource="http://guyharrison.squarespace.com/blog/2009/11/30/more-on-the-database-flash-cache.html"/><rdf:li rdf:resource="http://guyharrison.squarespace.com/blog/2009/11/24/using-the-oracle-11gr2-database-flash-cache.html"/><rdf:li rdf:resource="http://guyharrison.squarespace.com/blog/2009/10/28/performant-oracle-programming-perl.html"/><rdf:li rdf:resource="http://guyharrison.squarespace.com/blog/2009/10/19/oracle-performance-programming-net.html"/><rdf:li rdf:resource="http://guyharrison.squarespace.com/blog/2009/10/8/oracle-openworld-again.html"/><rdf:li rdf:resource="http://guyharrison.squarespace.com/blog/2009/10/5/oracle-performance-survival-guide-available-as-pdf.html"/><rdf:li rdf:resource="http://guyharrison.squarespace.com/blog/2009/9/18/mts-amm-bulk-collect-trouble.html"/><rdf:li rdf:resource="http://guyharrison.squarespace.com/blog/2009/9/14/more-on-the-parallel-execution-queue.html"/><rdf:li rdf:resource="http://guyharrison.squarespace.com/blog/2009/9/7/the-parallel_degree_policy-parameter-in-11gr2.html"/><rdf:li rdf:resource="http://guyharrison.squarespace.com/blog/2009/9/2/columnar-compression-in-11gr2.html"/></rdf:Seq></rss:items></rss:channel><rss:item rdf:about="http://guyharrison.squarespace.com/blog/2009/11/30/more-on-the-database-flash-cache.html"><rss:title>More on the database flash cache</rss:title><rss:link>http://guyharrison.squarespace.com/blog/2009/11/30/more-on-the-database-flash-cache.html</rss:link><dc:creator>Guy Harrison</dc:creator><dc:date>2009-12-01T00:56:51Z</dc:date><dc:subject></dc:subject><content:encoded><![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>]]></content:encoded></rss:item><rss:item rdf:about="http://guyharrison.squarespace.com/blog/2009/11/24/using-the-oracle-11gr2-database-flash-cache.html"><rss:title>Using the Oracle 11GR2 database flash cache</rss:title><rss:link>http://guyharrison.squarespace.com/blog/2009/11/24/using-the-oracle-11gr2-database-flash-cache.html</rss:link><dc:creator>Guy Harrison</dc:creator><dc:date>2009-11-24T06:10:35Z</dc:date><dc:subject></dc:subject><content:encoded><![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>]]></content:encoded></rss:item><rss:item rdf:about="http://guyharrison.squarespace.com/blog/2009/10/28/performant-oracle-programming-perl.html"><rss:title>Performant Oracle programming: perl</rss:title><rss:link>http://guyharrison.squarespace.com/blog/2009/10/28/performant-oracle-programming-perl.html</rss:link><dc:creator>Guy Harrison</dc:creator><dc:date>2009-10-28T06:07:47Z</dc:date><dc:subject></dc:subject><content:encoded><![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>]]></content:encoded></rss:item><rss:item rdf:about="http://guyharrison.squarespace.com/blog/2009/10/19/oracle-performance-programming-net.html"><rss:title>Oracle performance programming: .NET</rss:title><rss:link>http://guyharrison.squarespace.com/blog/2009/10/19/oracle-performance-programming-net.html</rss:link><dc:creator>Guy Harrison</dc:creator><dc:date>2009-10-19T05:14:52Z</dc:date><dc:subject></dc:subject><content:encoded><![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>]]></content:encoded></rss:item><rss:item rdf:about="http://guyharrison.squarespace.com/blog/2009/10/8/oracle-openworld-again.html"><rss:title>Oracle OpenWorld again!</rss:title><rss:link>http://guyharrison.squarespace.com/blog/2009/10/8/oracle-openworld-again.html</rss:link><dc:creator>Guy Harrison</dc:creator><dc:date>2009-10-08T04:26:04Z</dc:date><dc:subject></dc:subject><content:encoded><![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>]]></content:encoded></rss:item><rss:item rdf:about="http://guyharrison.squarespace.com/blog/2009/10/5/oracle-performance-survival-guide-available-as-pdf.html"><rss:title>Oracle Performance Survival Guide available as PDF</rss:title><rss:link>http://guyharrison.squarespace.com/blog/2009/10/5/oracle-performance-survival-guide-available-as-pdf.html</rss:link><dc:creator>Guy Harrison</dc:creator><dc:date>2009-10-05T04:59:24Z</dc:date><dc:subject></dc:subject><content:encoded><![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>]]></content:encoded></rss:item><rss:item rdf:about="http://guyharrison.squarespace.com/blog/2009/9/18/mts-amm-bulk-collect-trouble.html"><rss:title>MTS + AMM + BULK COLLECT = Trouble!</rss:title><rss:link>http://guyharrison.squarespace.com/blog/2009/9/18/mts-amm-bulk-collect-trouble.html</rss:link><dc:creator>Guy Harrison</dc:creator><dc:date>2009-09-19T01:02:36Z</dc:date><dc:subject></dc:subject><content:encoded><![CDATA[<p>Most databases don't run with shared servers - A.K.A. Multi-Threaded Servers or MTS - nowadays. &nbsp; While reducing the number of server processes can reduce overall memory demand and sometimes certain forms of contention, the drawbacks - particularly delays caused when all serves are busy - are generally regarded as greater than the advantages.&nbsp;</p>
<p><span>MTS becomes downright dangerous when Automatic Shared Memory Management (<span>ASMM</span>) or Automatic Memory Management (<span>AMM</span>) is in place. &nbsp;When you use MTS and <span>AMM</span> together, PL/<span>SQL</span> programs that try to create large collections can effectively consume all available memory with disastrous consequences.&nbsp;</span></p>]]></content:encoded></rss:item><rss:item rdf:about="http://guyharrison.squarespace.com/blog/2009/9/14/more-on-the-parallel-execution-queue.html"><rss:title>More on the parallel execution queue</rss:title><rss:link>http://guyharrison.squarespace.com/blog/2009/9/14/more-on-the-parallel-execution-queue.html</rss:link><dc:creator>Guy Harrison</dc:creator><dc:date>2009-09-14T06:03:04Z</dc:date><dc:subject></dc:subject><content:encoded><![CDATA[<p>In the <a href="http://guyharrison.squarespace.com/blog/2009/9/7/the-parallel_degree_policy-parameter-in-11gr2.html">last post</a>, I looked at how the 11GR2 parallel execution queue worked. &nbsp;Essentially the holder of the JX enqueue is the next in line for parallel execution and others in the queue are waiting on the JX enqueue. &nbsp;</p>
<p>I thought it would be useful to write an SQL to list the PQO statements running, and those waiting. &nbsp;The script is <a href="http://guyharrison.squarespace.com/storage/parallel_queue.sql">here</a>: &nbsp;it joins V$SESSION, V$WAIT_CHAINS, V$PX_SESSION and V$SQL to show execution parallel SQLs and the SQLs holding or waiting on the JX enqueue.&nbsp;</p>
<p>Here's some sample output:</p>]]></content:encoded></rss:item><rss:item rdf:about="http://guyharrison.squarespace.com/blog/2009/9/7/the-parallel_degree_policy-parameter-in-11gr2.html"><rss:title>The parallel_degree_policy parameter in 11gR2</rss:title><rss:link>http://guyharrison.squarespace.com/blog/2009/9/7/the-parallel_degree_policy-parameter-in-11gr2.html</rss:link><dc:creator>Guy Harrison</dc:creator><dc:date>2009-09-08T01:47:51Z</dc:date><dc:subject></dc:subject><content:encoded><![CDATA[<p>Oracle 11G release 2 introduced a number of singificant tweaks to parallel SQL. &nbsp;One of the more significant was the new parameter PARALLEL_DEGREE_POLICY. &nbsp;</p>
<p>The PARALLEL_DEGREE_POLICY default setting of MANUAL &nbsp;results in &nbsp;Oracle 11G release 1 behavior. &nbsp;A setting of AUTO results in the following new behaviors:</p>
<p>&nbsp;</p>
<ul>
<li>The Degree of Parallelism (DOP)&nbsp;may be calculated based on the types of operations in the SQL statement and the sizes of the tables. &nbsp;The DOP for a sort of a massive table might be set higher than that of a small table, for instance.&nbsp;</li>
<li>If the requested or required DOP is currently not possible because parallel servers are busy, then Oracle will delay statement execution rather than downgrading or serliazing the SQL.&nbsp;</li>
<li>Oracle parallel slaves may use buffered IO rather than direct IO: &nbsp;Oracle calls this (misleadingly I think) "in-memory parallel execution".&nbsp;</li>
</ul>
<p>There's a mid-range setting of LIMITED that enables automatic DOP only.&nbsp;</p>
<p>In this post I'm going to look at the last two changes: &nbsp;defered execution of Parallel SQL and buffered parallel IO.&nbsp;</p>]]></content:encoded></rss:item><rss:item rdf:about="http://guyharrison.squarespace.com/blog/2009/9/2/columnar-compression-in-11gr2.html"><rss:title>Columnar compression in 11gR2</rss:title><rss:link>http://guyharrison.squarespace.com/blog/2009/9/2/columnar-compression-in-11gr2.html</rss:link><dc:creator>Guy Harrison</dc:creator><dc:date>2009-09-03T00:47:35Z</dc:date><dc:subject></dc:subject><content:encoded><![CDATA[<p>We often think of compression as being a trade off between performance and storage:&nbsp; compression reduces the amount of storage required, but the overhead of compressing and decompressing makes things slower.&nbsp; However, while there is always some CPU overhead involved in compression the effect on table scan IO can be favourable, since if a table is reduced in size it will require fewer IO operations to read it.&nbsp;</p>
<p>Prior to 11g, table compression could only be achieved when the table was created, rebuilt or when using direct load operations.&nbsp; However, in 11g, the Advanced Compression option allows data to be compressed when manipulated by standard DML. &nbsp;&nbsp;Compression becomes even more attractive in 11gR2 because we can use <em>columnar </em>compression to get much higher compression levels than were previously possible.&nbsp;</p>]]></content:encoded></rss:item></rdf:RDF>