<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-701363651395633136</id><updated>2012-02-01T13:17:37.130-05:00</updated><title type='text'>Qi Yang's Workbook</title><subtitle type='html'>This is the place I make notes for my experience/knowledge as an IT Professional.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://qyang.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/701363651395633136/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://qyang.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Qi Yang</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>5</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-701363651395633136.post-3954055170783160919</id><published>2011-12-29T15:24:00.002-05:00</published><updated>2011-12-29T15:48:20.111-05:00</updated><title type='text'>Exadata's EHCC and NoSQL database</title><content type='html'>Among all the good feature&amp;nbsp;Exadata have, &amp;nbsp;EHCC ( Exadata Hybrid Columnar Compression) comes as the top of my list. Exadata cell introduce a new storage concept called CU (Compression Unit). The CU is sitting on top of regular oracle data blocks. Inside the CU, the data is organized&amp;nbsp; by column (not by row). To&amp;nbsp;put in BigData term, it&amp;nbsp;is cloumn&amp;nbsp;oriented store. &amp;nbsp;This way, Exadata archived high compression ratio which is not available in traditional row oriented database. In my test case, the EHCC compression ratio can easily hit 10 and sometime even 20.&amp;nbsp; The high compression ratio plus other feature Exadata have give exadata an edge to Big Data problem. Think about your I/O requirement is just reduced by 1 order after the compression for same amount of data. &lt;br /&gt;&lt;br /&gt;Another trend in today's Database world is what is called NoSQL database. It's targeting to solve BigData problem. It's very hard for RDBMS to hadle data at perabyte level. Some of open source product are coming into play like Cassandra, MangoDB and HBase. To me this NoSQL databases are just another approach to tackle the Big Data problem although they are fundamentally different with RDBMS. &lt;br /&gt;&lt;br /&gt;So there&amp;nbsp;are two approaches to solve the same problem. It's interesting to see how the products changes in both school for wide adoption.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/701363651395633136-3954055170783160919?l=qyang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qyang.blogspot.com/feeds/3954055170783160919/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qyang.blogspot.com/2011/12/exadatas-ehcc-and-nosql-database.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/701363651395633136/posts/default/3954055170783160919'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/701363651395633136/posts/default/3954055170783160919'/><link rel='alternate' type='text/html' href='http://qyang.blogspot.com/2011/12/exadatas-ehcc-and-nosql-database.html' title='Exadata&apos;s EHCC and NoSQL database'/><author><name>Qi Yang</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-701363651395633136.post-2720834308665869496</id><published>2011-11-09T16:56:00.003-05:00</published><updated>2011-11-09T21:49:16.914-05:00</updated><title type='text'>11g Memory Management</title><content type='html'>AMM&lt;br /&gt;&lt;br /&gt;Automatic Memory Management is introduced in 11g. MMAN process will manage the size of PGA + SGA as needed&amp;nbsp;once database parameter MEMORY_TARGET is set. &lt;br /&gt;&lt;br /&gt;On Linux Platform don't enable AMM if you use Huge pages. Another error you often will get is &lt;br/&gt; &lt;pre&gt;'ORA-00845: MEMORY_TARGET not supported on this system'&lt;/pre&gt;Most of time this is because you don't have enough size of /dev/shm (Yes, Oracle is using memory map if you enable AMM.) You can change the /dev/shm size by editing /etc/fstab file or remount it.&lt;pre&gt; tmpfs&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /dev/shm&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tmpfs&amp;nbsp;&amp;nbsp; size=xxxxm&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 0&lt;/pre&gt;or&lt;pre&gt; mount -t tmpfs -o size=5G  tmpfs /dev/shm &lt;/pre&gt;&lt;br /&gt;ASMM&lt;br /&gt;&lt;br /&gt;Automatic Shared Memory Management is introduced in 10g. MMON and MMAN processes manage the size of SGA once database parameter SGA_TARGET is set. &lt;br /&gt;&lt;br /&gt;If you are running RAC,&amp;nbsp;test thoroughly&amp;nbsp;before you enable&amp;nbsp;ASMM. It may give you some trouble during memory adjusting process.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/701363651395633136-2720834308665869496?l=qyang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qyang.blogspot.com/feeds/2720834308665869496/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qyang.blogspot.com/2011/11/11g-r2-memory-management.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/701363651395633136/posts/default/2720834308665869496'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/701363651395633136/posts/default/2720834308665869496'/><link rel='alternate' type='text/html' href='http://qyang.blogspot.com/2011/11/11g-r2-memory-management.html' title='11g Memory Management'/><author><name>Qi Yang</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-701363651395633136.post-1986424268588069601</id><published>2011-09-09T23:54:00.001-04:00</published><updated>2011-09-09T23:54:47.742-04:00</updated><title type='text'>11g R2 RAC SCAN and VIP</title><content type='html'>&lt;br /&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;VIP is for quick response if one node crashed. VIP is on node level.&lt;/li&gt;&lt;li&gt;SCAN will allow RAC to change (Adding Node, Remove Node) without worrying about client TNS update. It is cluster level VIP.&lt;/li&gt;&lt;li&gt;When client connect to SCAN Listener, it will redirect the connection to a local listener on VIP. In this sense, SCAN listener acts like old remote listener. It didn't start server process itself. but hand the client connection to local listener which will start a server process.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/701363651395633136-1986424268588069601?l=qyang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qyang.blogspot.com/feeds/1986424268588069601/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qyang.blogspot.com/2011/09/11g-r2-rac-scan-and-vip.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/701363651395633136/posts/default/1986424268588069601'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/701363651395633136/posts/default/1986424268588069601'/><link rel='alternate' type='text/html' href='http://qyang.blogspot.com/2011/09/11g-r2-rac-scan-and-vip.html' title='11g R2 RAC SCAN and VIP'/><author><name>Qi Yang</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-701363651395633136.post-4339558605625266636</id><published>2011-09-09T23:22:00.000-04:00</published><updated>2011-09-09T23:22:58.057-04:00</updated><title type='text'>11g ASM, DB use Hugepages Memory on Linux</title><content type='html'>&lt;div&gt;Steps&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Allocate memory for hugepage memory&amp;nbsp;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;/etc/sysctl.conf -&amp;nbsp;vm.nr_hugepages&lt;/li&gt;&lt;li&gt;cat /proc/meminfo to verify&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Allow ASM/DB user to lock enough memory&lt;/li&gt;&lt;ul&gt;&lt;li&gt;/etc/security/limits.conf - oracle soft&amp;nbsp;memlock &amp;nbsp;12582912&lt;/li&gt;&lt;li&gt;For ASM - add ulimit -l&amp;nbsp;12582912 into /etc/init.d/ohasd &amp;nbsp;&lt;/li&gt;&lt;li&gt;cat /proc/(ASM,DB)process-id/limits to verify&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Disable DB/ASM AMM&lt;/li&gt;&lt;ul&gt;&lt;li&gt;alter system set memory_target=0&lt;/li&gt;&lt;li&gt;ipcs -m to verify the allocated share memory equals SGA size&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;Reference:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://yong321.freeshell.org/oranotes/HugePages.txt"&gt;http://yong321.freeshell.org/oranotes/HugePages.txt&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/701363651395633136-4339558605625266636?l=qyang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qyang.blogspot.com/feeds/4339558605625266636/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qyang.blogspot.com/2011/09/11g-asm-db-use-hugepages-memory-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/701363651395633136/posts/default/4339558605625266636'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/701363651395633136/posts/default/4339558605625266636'/><link rel='alternate' type='text/html' href='http://qyang.blogspot.com/2011/09/11g-asm-db-use-hugepages-memory-on.html' title='11g ASM, DB use Hugepages Memory on Linux'/><author><name>Qi Yang</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-701363651395633136.post-2680372358592578522</id><published>2011-08-09T10:24:00.001-04:00</published><updated>2011-08-09T10:24:57.645-04:00</updated><title type='text'>SQL avg/max on Oracle Interval Data Type</title><content type='html'>Recently someone was asking me how to do avg/max on Oracle data type interval. After do a little bit of googling and reading. Finally I came up with the solution. Although it's not elegant, it is good enough to do the job.&lt;br /&gt;&lt;br /&gt;Here is the SQL query&lt;br /&gt;&lt;code&gt;&lt;br /&gt;desc table1&lt;br /&gt;Name                Null     Type          &lt;br /&gt;------------------- -------- --------------&lt;br /&gt;CREATED_ON                   TIMESTAMP(6)  &lt;br /&gt;MODIFIED_ON                  TIMESTAMP(6)  &lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;select extract(day from numtodsinterval(avg(sysdate+(modified_on-created_on)-sysdate)*86400, 'second')) as days,&lt;br /&gt;extract(minute from numtodsinterval(avg(sysdate+(modified_on-created_on)-sysdate), 'day'))  as minutes&lt;br /&gt;from table1&lt;br /&gt;where modified_on != created_on;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;In Oracle Database, timestamp - timestamp date type will return interval data type. As avg/max can't function on interval directly, I did a a little data conversion as you can see in the query.&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/701363651395633136-2680372358592578522?l=qyang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qyang.blogspot.com/feeds/2680372358592578522/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qyang.blogspot.com/2011/08/sql-avgmax-on-oracle-interval-data-type.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/701363651395633136/posts/default/2680372358592578522'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/701363651395633136/posts/default/2680372358592578522'/><link rel='alternate' type='text/html' href='http://qyang.blogspot.com/2011/08/sql-avgmax-on-oracle-interval-data-type.html' title='SQL avg/max on Oracle Interval Data Type'/><author><name>Qi Yang</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
