<?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>OS与Oracle &#187; DSS</title>
	<atom:link href="http://www.os2ora.com/tag/dss/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.os2ora.com</link>
	<description>专注于现实世界Oracle数据库的高性能，高可扩展性与新一代数据库Exadata架构</description>
	<lastBuildDate>Fri, 16 Jul 2010 02:55:51 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>无奈的DBA</title>
		<link>http://www.os2ora.com/helpless-dba/</link>
		<comments>http://www.os2ora.com/helpless-dba/#comments</comments>
		<pubDate>Sun, 30 May 2010 15:28:13 +0000</pubDate>
		<dc:creator>Kaya</dc:creator>
				<category><![CDATA[Exadata]]></category>
		<category><![CDATA[数据库性能调优]]></category>
		<category><![CDATA[系统架构]]></category>
		<category><![CDATA[DBA]]></category>
		<category><![CDATA[DSS]]></category>
		<category><![CDATA[Index]]></category>
		<category><![CDATA[容量规划]]></category>
		<category><![CDATA[架构]]></category>

		<guid isPermaLink="false">http://www.os2ora.com/helpless-dba/</guid>
		<description><![CDATA[在检查客户的代码中，有时会深刻地感觉到原代码编写者在调试代码时的无奈。
这使我想起以前调试代码时的经历。一个SQL迟迟不返回结果，一小时过去了，又一小时过去了...... 于是，想了好多调优的方法，调整系统参数，为这个SQL建立很多Index，加上各种各样的Hint ...... 
于是，现在在代码中看到似曾相识的/*+ index(t_xx, idx_xx) */时，有时会发自内心的笑了，同时，轻巧地把里面的+号删掉了，我就让这些个hint不起作用，不强迫CBO走index了，结果当然是CBO选择了Hash Join，而不是原代码编写者指定的Nested Loop，于是，执行速度嗖一下上去了。
有另一个有趣的事情......]]></description>
			<content:encoded><![CDATA[<p>Kaya 发表于 <a href="http://www.os2ora.com/">os2ora.com</a></p>
<p>在检查客户的代码中，有时会深刻地感觉到原代码编写者在调试代码时的无奈。</p>
<p>这使我想起以前调试代码时的经历。一个SQL迟迟不返回结果，一小时过去了，又一小时过去了&#8230;&#8230; 于是，想了好多调优的方法，调整系统参数，为这个SQL建立很多Index，加上各种各样的Hint &#8230;&#8230; </p>
<p>于是，现在在代码中看到似曾相识的/*+ index(t_xx, idx_xx) */时，有时会发自内心的笑了，同时，轻巧地把里面的+号删掉了，我就让这些个hint不起作用，不强迫CBO走index了，结果当然是CBO选择了Hash Join，而不是原代码编写者指定的Nested Loop，于是，执行速度嗖一下上去了。</p>
<p>还有另一个有趣的事情，对大表的操作DSS查询或DML操作，检查客户的执行计划，无一例外地没有用并行查询或者并行DML，当然，里面会用到很多类似上面的/*+ index(t_xx, idx_xx) */。于是，心里很纳闷，这样跑DSS查询或DML操作，要跑到啥时候才跑完啊？有趣的地方在于，发现了原代码编写者的一个可能的workaround，对大表进行分割分片处理，一次跑不完，我跑它个几百上千次还可以吧。很聪明的做法，不过也感觉到一阵阵深深的无奈。</p>
<p>不可否以地，很多客户有很复杂的业务逻辑要处理，DBA们和开发者们也很聪明地运用着Oracle的技术。编写的代码质量其实也是可圈可点的。不过，在代码实现与现实世界之间，我们却不得不面对一个折衷，优雅的代码，在糟糕的机器配置之前，只能无能为力，于是，过度的调优也就理所当然，顺理成章的成为了主流。</p>
<p>或许，我们的DBA们要主动地进行呐喊；或许，我们还需要有这样的职位，能够从大局上对系统进行规划，包括对系统硬件的容量规划，系统软件实现上的总体设计，最佳实践上的运用等等；或许，也应该是架构师工作的一部分？</p>
]]></content:encoded>
			<wfw:commentRss>http://www.os2ora.com/helpless-dba/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exadata V2 架构分析 (1)</title>
		<link>http://www.os2ora.com/exadata-architecture-analysis-1/</link>
		<comments>http://www.os2ora.com/exadata-architecture-analysis-1/#comments</comments>
		<pubDate>Thu, 13 May 2010 15:13:28 +0000</pubDate>
		<dc:creator>Kaya</dc:creator>
				<category><![CDATA[Exadata]]></category>
		<category><![CDATA[DSS]]></category>
		<category><![CDATA[Flash Cache]]></category>
		<category><![CDATA[IOPS]]></category>
		<category><![CDATA[MBPS]]></category>
		<category><![CDATA[OLTP]]></category>
		<category><![CDATA[Smart Scan]]></category>

		<guid isPermaLink="false">http://www.os2ora.com/exadata-architecture-analysis-1/</guid>
		<description><![CDATA[准备写一系列的文章，专门分析下Exadata的架构。时间真过得很快，自从Exadata问世以来，一直围绕着它做各种各样的性能测试，从V1过渡到V2。Exadata在大踏步地前进着，我总认为，这应该是一个很优秀的产品，而我也相信时间会证明这一点的。
这些文章不会有很严谨的结构，或许某天，某时发现的一个特性，一个特点，一个最佳实践，一个有意思的地方，一个令人惊讶的数据，一个令人鼓舞的图形，都会成为这一系列文章的一部分。
Flash Cache是V2里引入的一个特性，大家或许都认为Flash Cache 主要是用于OLTP场合，为OLTP提高更高的IOPS，这点当然没错，Flash Cache相比于一般磁盘，会带来上十倍的IOPS的性能提升。但即使对于DSS场合，Flash Cache也是提升性能的一个利器......]]></description>
			<content:encoded><![CDATA[<p>Kaya 发表于 <a href="http://www.os2ora.com/">os2ora.com</a></p>
<p>准备写一系列的文章，专门分析下Exadata的架构。时间真过得很快，自从Exadata问世以来，一直围绕着它做各种各样的性能测试，从V1过渡到V2。Exadata在大踏步地前进着，我总认为，这应该是一个很优秀的产品，而我也相信时间会证明这一点的。</p>
<p>这些文章不会有很严谨的结构，或许某天，某时发现的一个特性，一个特点，一个最佳实践，一个有意思的地方，一个令人惊讶的数据，一个令人鼓舞的图形，都会成为这一系列文章的一部分。</p>
<p>Flash Cache是V2里引入的一个特性，大家或许都认为Flash Cache 主要是用于OLTP场合，为OLTP提高更高的IOPS，这点当然没错，Flash Cache相比于一般磁盘，会带来上十倍的IOPS的性能提升。但即使对于DSS场合，Flash Cache也是提升性能的一个利器。</p>
<p>下面是看图说话时间。</p>
<p><a href="http://www.os2ora.com/wp-content/uploads/2010/05/flashdss1.jpg"><img title="flash-dss" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="392" alt="flash-dss" src="http://www.os2ora.com/wp-content/uploads/2010/05/flashdss_thumb1.jpg" width="449" border="0" /></a> <a href="http://www.os2ora.com/wp-content/uploads/2010/05/flashdss21.jpg"><img title="flash-dss2" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="402" alt="flash-dss2" src="http://www.os2ora.com/wp-content/uploads/2010/05/flashdss2_thumb1.jpg" width="465" border="0" /></a> </p>
<p>左图中，MBPS达到了4.5 GB/s。但是存贮节点上的CPU和数据库节点上的CPU的利用率却在20%左右。如果在存贮节点加入Flash Cache，整个系统会发生什么样的改变呢？右图就是加入了flash cache后的CPU/IO情况。MBPS达到了14G/s，存贮节点的CPU利用率超过了60%，DB节点上的CPU利用率也超过了40%。</p>
<p>仔细地对比研究这个图，对系统间资源的协作会有进一步的认识。</p>
<p>可以说, Flash Cache除了提供更高的带宽外，还大大解放了存贮节点上的CPU处理能力。这种处理能力可是单纯的高端存贮都不具备的，这就是Exadata上独有的Smart Scan特性。Exadata V1实现了对磁盘的Smart Scan，而V2则实现了对Flash Cache的更快，更强大的Smart Scan。当然，在软件设计上，还有另一个重头戏，它更是大大的利用起了存贮节点上的CPU处理能力，同时还能减少对带宽的争用。至于更具体的信息，留在另一篇介绍啦。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.os2ora.com/exadata-architecture-analysis-1/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>物化视图，索引，数据仓库</title>
		<link>http://www.os2ora.com/materialized-view-index-data-warehousing/</link>
		<comments>http://www.os2ora.com/materialized-view-index-data-warehousing/#comments</comments>
		<pubDate>Sun, 21 Jun 2009 06:04:57 +0000</pubDate>
		<dc:creator>Kaya</dc:creator>
				<category><![CDATA[Oracle SQL 扩展]]></category>
		<category><![CDATA[数据库性能调优]]></category>
		<category><![CDATA[Ad-Hoc]]></category>
		<category><![CDATA[DSS]]></category>
		<category><![CDATA[Exadata]]></category>
		<category><![CDATA[Index]]></category>
		<category><![CDATA[Materialized View]]></category>
		<category><![CDATA[OLAP]]></category>
		<category><![CDATA[Query Rewrite]]></category>

		<guid isPermaLink="false">http://www.os2ora.com/materialized-view-index-data-warehousing/</guid>
		<description><![CDATA[Materialized Views, 其实不是View。我觉得把它归类于Index可能还准确一些。
View在我们的印象里总是逻辑存在的。即使前面加上一个Materialized，我们只会觉得奇怪，干嘛要对View进行物化呢？
把它理解为一种特殊的Index未尝不可，况且，它与Index有一些相同点：
They consume storage space.
They must be refreshed when the data in their master tables changes.
They improve the performance of SQL execution when they are used for query rewrites.
Their existence is transparent to SQL applications and users.......]]></description>
			<content:encoded><![CDATA[<p>Kaya 发表于 <a href="http://www.os2ora.com">os2ora.com</a></p>
<p>Materialized Views, 其实不是View。我觉得把它归类于Index可能还准确一些。</p>
<p>View在我们的印象里总是逻辑存在的。即使前面加上一个Materialized，我们只会觉得奇怪，干嘛要对View进行物化呢？</p>
<p>把它理解为一种特殊的Index未尝不可，况且，它与Index有一些相同点：</p>
<ul>
<li>They consume storage space.</li>
<li>They must be refreshed when the data in their master tables changes.</li>
<li>They improve the performance of SQL execution when they are used for <strong><em>query rewrites</em></strong>.</li>
<li>Their existence is transparent to SQL applications and users.</li>
</ul>
<p>而一般的View呢？</p>
<ul>
<li>They <em>don’t </em>consume storage space.</li>
<li>They <em>don’t</em> need to be refreshed when the data in their master tables changes.</li>
<li>They <em>don’t </em>improve the performance of SQL execution, database just maps the View to the underlying Table when executing.</li>
<li>Their existence is transparent to SQL applications and users.</li>
</ul>
<p>不过，Materialized View为什么特殊，我觉得在于它的应用场合——数据仓库。或许我们可以说，Materialized View 是专门用于数据仓库的Index。</p>
<p>问题在于，数据仓库场合和OLTP场合对Index的要求有哪些不同，干嘛需要一个专门的Materialized View？</p>
<p>数据仓库的查询一般都是”大”查询。何谓大？多表联合（n个大表join在一起），多维度分析（一长串的group by），聚合统计（avg, count, sum,rank,cube）。</p>
<p>数据库如何跑这种查询呢？硬件方面，用更多的CPU和硬盘；软件方面，采用数据分区，并行执行。软硬件一起提供的厂商，如Oracle的Exadata, Teradata, Netezza, 可能做到数据库软件与硬件的紧密结合，从而实现对数据的智能扫描（在IO这一层实现对不需要数据的过滤）等技术。</p>
<p>这种做法可以很好地应对数据仓库里一类重要的查询：随机查询。例如，某位领导突然想到了一个决策方案，开发人员必须为这种决策提供分析数据。</p>
<p>另一方面，如果某类“大”查询经常被执行，我们就得想办法对其进行优化了。最直接的方法就是缓存中间结果，多表连接的结果，多维度分析的结果，聚合统计的结果，对了，这就是Materialized View的用武之地了。</p>
<p>Materialized View缓存了中间结果，Oracle通过Query Rewrite的技术把对基表的访问转换成对Materialized View的访问。这个对性能的提高可以是成千上万倍的。</p>
<p>如何创建Materialized View以便让Query Rewrite用到，这也许是Materialized View里面最重要的部分，也是理解Query Rewrite如何工作的一个途径。最好的参考文献当然是Oracle的<strong><a href="http://download.oracle.com/docs/cd/B28359_01/server.111/b28313/qradv.htm">Oracle® Database Data Warehousing Guide</a>.</strong></p>
<p>以后的文章再回来看看Query Rewrite的实现。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.os2ora.com/materialized-view-index-data-warehousing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
