<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Oracle Stuff I Should Have Known !</title>
	<atom:link href="http://oracleandy.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://oracleandy.wordpress.com</link>
	<description>Oracle, the obvious, and the not so Obvious ...</description>
	<lastBuildDate>Fri, 25 Feb 2011 19:56:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='oracleandy.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Oracle Stuff I Should Have Known !</title>
		<link>http://oracleandy.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://oracleandy.wordpress.com/osd.xml" title="Oracle Stuff I Should Have Known !" />
	<atom:link rel='hub' href='http://oracleandy.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Oracle on ext4 warning</title>
		<link>http://oracleandy.wordpress.com/2010/05/19/oracle-on-ext4-warning/</link>
		<comments>http://oracleandy.wordpress.com/2010/05/19/oracle-on-ext4-warning/#comments</comments>
		<pubDate>Wed, 19 May 2010 08:18:23 +0000</pubDate>
		<dc:creator>Andy Campbell</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://oracleandy.wordpress.com/?p=97</guid>
		<description><![CDATA[I bought a new laptop recently ( Dell Studio XPS 16 ) Core 7i, 8Gb, 7200RPM disk.  I installed my Linux distro of choice, Fedora 12, and started installing Oracle.  Yeah I know Fedora isn&#8217;t a supported OS, but I&#8217;ve got almost ever version from 8.1.7.4 to 11.2 and I&#8217;ve never really hit any problems [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oracleandy.wordpress.com&amp;blog=1128202&amp;post=97&amp;subd=oracleandy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I bought a new laptop recently ( Dell Studio XPS 16 ) Core 7i, 8Gb, 7200RPM disk.  I installed my Linux distro of choice, Fedora 12, and started installing Oracle.  Yeah I know Fedora isn&#8217;t a supported OS, but I&#8217;ve got almost ever version from 8.1.7.4 to 11.2 and I&#8217;ve never really hit any problems for testing use.</p>
<p>To justify my new purchase, I thought I check how lighting fast it was in comparison to my 3+ year old Dell D620.  I timed how long it would take to create a 10.2.0.4 database &#8211; problem was &#8230;.</p>
<p>Old Laptop :   ~10 mins<br />
New Laptop : ~20 mins</p>
<p>The only difference I could see was that the old machine was 32bit the new one was 64bit and wasted a bit of time going down that dead end.  Anyway after lots of investigation I eventually noticed that the old machine the database filesystem was built with ext3 ( it was  created back when Fedora 6 was current), the new laptop was using <a href="http://en.wikipedia.org/wiki/Ext4">ext4</a>.</p>
<p>I found a blog <a title="Permanent Link to Mount options to improve ext4 file system performance" rel="bookmark" href="http://blog.smartlogicsolutions.com/2009/06/04/mount-options-to-improve-ext4-file-system-performance/">Mount options to improve ext4 file system performance</a> and tried the options suggested  &#8211; and magically the database creation time dropped from 20mins to ~6mins !  Then to confirm I rebuilt the filesystem as ext3, and retained the 6min build time.</p>
<p><a href="http://en.wikipedia.org/wiki/Ext4">ext4</a> has been standard on the bleeding edge distros for a while now, and is starting to appear in the enterprise Linux distos, <a href="http://www.redhat.com/rhel/beta/">Red Hat EL6 beta </a>lists as a feature.  So watch your Oracle performance if you are considering ext4.</p>
<p>Andy</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/oracleandy.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/oracleandy.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/oracleandy.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/oracleandy.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/oracleandy.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/oracleandy.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/oracleandy.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/oracleandy.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/oracleandy.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/oracleandy.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/oracleandy.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/oracleandy.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/oracleandy.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/oracleandy.wordpress.com/97/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oracleandy.wordpress.com&amp;blog=1128202&amp;post=97&amp;subd=oracleandy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://oracleandy.wordpress.com/2010/05/19/oracle-on-ext4-warning/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/132d2a575cc8774fbfaade4df402de34?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Andy Campbell</media:title>
		</media:content>
	</item>
		<item>
		<title>Quick Note</title>
		<link>http://oracleandy.wordpress.com/2010/01/22/quick-note/</link>
		<comments>http://oracleandy.wordpress.com/2010/01/22/quick-note/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 17:59:57 +0000</pubDate>
		<dc:creator>Andy Campbell</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://oracleandy.wordpress.com/?p=83</guid>
		<description><![CDATA[Just noticed this on the Apress site, looks like can expect a new book from Tom Kyte in the summer &#8230; http://apress.com/book/view/9781430229469 Thought he had been quiet recently.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oracleandy.wordpress.com&amp;blog=1128202&amp;post=83&amp;subd=oracleandy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Just noticed this on the Apress site, looks like can expect a new book from Tom Kyte in the summer &#8230;</p>
<p><a href="http://apress.com/book/view/9781430229469" target="_blank">http://apress.com/book/view/9781430229469</a></p>
<p>Thought he had been quiet recently.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/oracleandy.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/oracleandy.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/oracleandy.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/oracleandy.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/oracleandy.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/oracleandy.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/oracleandy.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/oracleandy.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/oracleandy.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/oracleandy.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/oracleandy.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/oracleandy.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/oracleandy.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/oracleandy.wordpress.com/83/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oracleandy.wordpress.com&amp;blog=1128202&amp;post=83&amp;subd=oracleandy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://oracleandy.wordpress.com/2010/01/22/quick-note/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/132d2a575cc8774fbfaade4df402de34?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Andy Campbell</media:title>
		</media:content>
	</item>
		<item>
		<title>Has there been a big change in data volume ?</title>
		<link>http://oracleandy.wordpress.com/2010/01/22/has-there-been-a-big-change-in-data-volume/</link>
		<comments>http://oracleandy.wordpress.com/2010/01/22/has-there-been-a-big-change-in-data-volume/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 10:08:31 +0000</pubDate>
		<dc:creator>Andy Campbell</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Oracle DBA]]></category>

		<guid isPermaLink="false">http://oracleandy.wordpress.com/?p=63</guid>
		<description><![CDATA[Ever get requests from users/developers complaining that queries or feeds are suddenly running slower &#8211; and claiming nothing has changed ?  Are you  pretty sure its just going to data volume or some sort of change in table statistics? One of the useful features introduced in 10g was DBMS_STATS automatically saving old statistics before it [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oracleandy.wordpress.com&amp;blog=1128202&amp;post=63&amp;subd=oracleandy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Ever get requests from users/developers complaining that queries or feeds are suddenly running slower &#8211; and claiming nothing has changed ?  Are you  pretty sure its just going to data volume or some sort of change in table statistics?</p>
<p>One of the useful features introduced in 10g was DBMS_STATS automatically saving old statistics before it replaces them, this allows you run a query to see the history of the number of rows and sample size for a table and spot sudden changes or patterns.</p>
<pre class="brush: sql;">
SELECT  obj.owner
       ,obj.object_name                   table_name
       ,NVL(obj.subobject_name,'GLOBAL')  partition_name
       ,TO_CHAR(hist.savtime)             save_time
       ,rowcnt
       ,DECODE( rowcnt,0,100, ROUND( samplesize / rowcnt  * 100 )) SampleSize
  FROM  dba_objects obj
       ,sys.wri$_optstat_tab_history hist
 WHERE  hist.obj#          = obj.object_id
   AND  owner              LIKE  '%&amp;OWNER%'
   AND  object_name        LIKE  '%&amp;TABLE_NAME%'
 ORDER  BY obj.owner,
            obj.object_name,
            obj.subobject_name,
            hist.savtime;
</pre>
<p>Which would could produce output something like the following ( edited to fit ) &#8230;</p>
<pre>OWNER      Table Name SAVE_TIME                               ROWCNT SAMPLESIZE
---------- ---------- ----------------------------------- ---------- ----------
TST        MYTABLE    21-DEC-09 10.48.49.657130 PM -08:00    4599783         35
                      22-DEC-09 08.51.03.804101 PM -08:00    4609457         35
                      22-DEC-09 10.25.03.426489 PM -08:00    4606449         35
                      23-DEC-09 10.53.17.058652 PM -08:00    4602537         35
                      24-DEC-09 11.01.33.769205 PM -08:00    4609786         35
                      25-DEC-09 10.29.19.524311 PM -08:00    4608197         35
                      26-DEC-09 10.29.57.033672 PM -08:00    4607169         35
                      27-DEC-09 08.42.30.261394 PM -08:00    4608031         35
                      28-DEC-09 09.01.04.458258 AM -08:00    4610931         35
                      28-DEC-09 08.58.45.685068 PM -08:00    4611994         35
                      29-DEC-09 08.54.35.136462 PM -08:00    4610089         35
                      &lt;snip&gt;
                      19-JAN-10 08.48.50.453766 PM -08:00    4621849         35
                      19-JAN-10 08.51.17.329342 PM -08:00    4625629         35
                      19-JAN-10 10.04.42.517133 PM -08:00    4625584        100
                      20-JAN-10 09.53.32.024996 PM -08:00    4622763         35
                      20-JAN-10 10.59.40.301349 PM -08:00    4627791        100
                      21-JAN-10 09.01.01.591324 PM -08:00    4624446         35
</pre>
<p>Here the data volumes aren&#8217;t changing much although steadily increasing, but you can see gather stats is getting run twice on days without much change in data volume, but with different sample sizes.  It needs a little more investigation but this probably the scheduled automatic job (SYS.GATHER_STATS_JOB ) and a manually submitted gather_stats from a batch job or app support.</p>
<p>How much history is kept?  By default 31 days, but this can be increased.</p>
<pre class="brush: sql;">
SELECT  'History Retention'&lt;/pre&gt;
       ,TO_CHAR(dbms_stats.get_stats_history_retention)
  FROM  dual
</pre>
<p>How much does space my stats history take ?</p>
<pre class="brush: sql;">
SELECT  occupant_name
       ,schema_name
       ,space_usage_kbytes Used_kb
  FROM  v$sysaux_occupants
 WHERE  OCCUPANT_NAME  = 'SM/OPTSTAT'
</pre>
</pre>
<pre>OCCUPANT_NAME        SCHEMA_NAME        USED_KB
-------------------- --------------- ----------
SM/OPTSTAT           SYS                1616384
</pre>
<p>I've used the history a number of times to spot sudden changes in data, and is a useful script to have in your back pocket.</p>
<p>Andy</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/oracleandy.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/oracleandy.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/oracleandy.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/oracleandy.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/oracleandy.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/oracleandy.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/oracleandy.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/oracleandy.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/oracleandy.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/oracleandy.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/oracleandy.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/oracleandy.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/oracleandy.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/oracleandy.wordpress.com/63/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oracleandy.wordpress.com&amp;blog=1128202&amp;post=63&amp;subd=oracleandy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://oracleandy.wordpress.com/2010/01/22/has-there-been-a-big-change-in-data-volume/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/132d2a575cc8774fbfaade4df402de34?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Andy Campbell</media:title>
		</media:content>
	</item>
		<item>
		<title>Not So Read Only &#8230;</title>
		<link>http://oracleandy.wordpress.com/2010/01/20/not-so-read-only/</link>
		<comments>http://oracleandy.wordpress.com/2010/01/20/not-so-read-only/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 11:55:03 +0000</pubDate>
		<dc:creator>Andy Campbell</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Oracle DBA]]></category>

		<guid isPermaLink="false">http://oracleandy.wordpress.com/?p=51</guid>
		<description><![CDATA[I&#8217;ve always assume making a tablespace READ ONLY meant NO changes could happen to its contents.  So for example if I create new tablespace, put a table in it and set it to be READ ONLY &#8230; 1:27:43 ops$oracle@ORA10204&#62; create tablespace TEST; Tablespace created. 11:27:58 ops$oracle@ORA10204&#62; create table andy tablespace test as select * from [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oracleandy.wordpress.com&amp;blog=1128202&amp;post=51&amp;subd=oracleandy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve always assume making a tablespace READ ONLY meant NO changes could happen to its contents.  So for example if I create new tablespace, put a table in it and set it to be READ ONLY &#8230;</p>
<pre class="brush: sql; highlight: [9];">

1:27:43 ops$oracle@ORA10204&gt; create tablespace TEST;

Tablespace created.

11:27:58 ops$oracle@ORA10204&gt; create table andy tablespace test as select * from dba_objects;

Table created.

11:28:21 ops$oracle@ORA10204&gt; alter tablespace TEST READ ONLY;

Tablespace altered.
</pre>
<p>So I <strong>can&#8217;t</strong> change the rows in the table, good &#8230;</p>
<pre class="brush: sql; highlight: [1];">

11:28:35 ops$oracle@ORA10204&gt; update andy set object_name = NULL;
update andy set object_name = NULL
 *
ERROR at line 1:
ORA-00372: file 6 cannot be modified at this time
ORA-01110: data file 6: '/db1/oradata/ORA10204/datafile/o1_mf_test_5oft5vpq_.dbf'
</pre>
<p>But I can <strong>drop the table</strong> !</p>
<pre class="brush: sql; highlight: [1];">

11:38:34 ops$oracle@ORA10204&gt; drop table andy;

Table dropped.
</pre>
<p>One workaround for this could be to disable DDL locks on the tables to make dropping tables harder &#8230;</p>
<pre class="brush: sql; highlight: [1,5];">

11:43:48 ops$oracle@ORA10204&gt; alter table andy disable table lock;

Table altered.

11:45:37 ops$oracle@ORA10204&gt; drop table andy;
drop table andy
 *
ERROR at line 1:
ORA-00069: cannot acquire lock -- table locks disabled for ANDY
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/oracleandy.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/oracleandy.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/oracleandy.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/oracleandy.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/oracleandy.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/oracleandy.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/oracleandy.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/oracleandy.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/oracleandy.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/oracleandy.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/oracleandy.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/oracleandy.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/oracleandy.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/oracleandy.wordpress.com/51/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oracleandy.wordpress.com&amp;blog=1128202&amp;post=51&amp;subd=oracleandy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://oracleandy.wordpress.com/2010/01/20/not-so-read-only/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/132d2a575cc8774fbfaade4df402de34?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Andy Campbell</media:title>
		</media:content>
	</item>
	</channel>
</rss>
