﻿<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.1.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>评论: 弄清楚你的业务类型——OLTP or OLAP</title>
	<link>http://www.ixdba.com/html/y2007/m05/112-database-oltp-olap.html</link>
	<description>dba on unix</description>
	<pubDate>Thu, 20 Nov 2008 20:57:25 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.1.2</generator>

	<item>
		<title>作者: 木匠</title>
		<link>http://www.ixdba.com/html/y2007/m05/112-database-oltp-olap.html#comment-498</link>
		<author>木匠</author>
		<pubDate>Tue, 29 May 2007 20:28:53 +0000</pubDate>
		<guid>http://www.ixdba.com/html/y2007/m05/112-database-oltp-olap.html#comment-498</guid>
					<description>两点问题需要深究:

1)数据库扩展是困难的，而应用服务器扩展是简单的。其实，也就是说，在高可用的OLTP环境中，数据库使用越简单的功能越好.

--Best practice:
请搜索和参考 Database API, 将数据处理集中在数据库完成, Java mid tier layer 只是调用 PL/SQL package (Database API).
数据库就是设计用来处理数据的,很多 功能+性能 远远强于 Java or C#.

2)OLTP 和 table/index partition

OLTP 可以使用 Table Partition,
便于日常数据维护,archive, 降低Contention.

即使Global Partition Index 也可以降低B Tree level, 加速Index Scan.
请查看 AnySQL 的技术博客, 有详细测试和解释.</description>
		<content:encoded><![CDATA[<p>两点问题需要深究:</p>
<p>1)数据库扩展是困难的，而应用服务器扩展是简单的。其实，也就是说，在高可用的OLTP环境中，数据库使用越简单的功能越好.</p>
<p>&#8211;Best practice:<br />
请搜索和参考 Database API, 将数据处理集中在数据库完成, Java mid tier layer 只是调用 PL/SQL package (Database API).<br />
数据库就是设计用来处理数据的,很多 功能+性能 远远强于 Java or C#.</p>
<p>2)OLTP 和 table/index partition</p>
<p>OLTP 可以使用 Table Partition,<br />
便于日常数据维护,archive, 降低Contention.</p>
<p>即使Global Partition Index 也可以降低B Tree level, 加速Index Scan.<br />
请查看 AnySQL 的技术博客, 有详细测试和解释.</p>
]]></content:encoded>
				</item>
	<item>
		<title>作者: piner</title>
		<link>http://www.ixdba.com/html/y2007/m05/112-database-oltp-olap.html#comment-499</link>
		<author>piner</author>
		<pubDate>Wed, 30 May 2007 00:26:35 +0000</pubDate>
		<guid>http://www.ixdba.com/html/y2007/m05/112-database-oltp-olap.html#comment-499</guid>
					<description>1、如果你这样，只会加重数据库的业务负担，在一些小的数据库系统上，这样做是可以的，但是，在一些大的，高业务访问的系统上，你这样做，就是让数据库死。
2、分区在oltp中，我不赞成使用的，除非你有很特别的数据类型，如日志，正好可以根据日志时间来分区，方便归档。
但是，你说全局索引可以提高访问性能，这个是没有任何道理的，呵呵，全局索引中保存的rowid长度还是10个字节的，比普通索引要多4个字节，这点你要清楚。
另外，分区是需要另外付费的。</description>
		<content:encoded><![CDATA[<p>1、如果你这样，只会加重数据库的业务负担，在一些小的数据库系统上，这样做是可以的，但是，在一些大的，高业务访问的系统上，你这样做，就是让数据库死。<br />
2、分区在oltp中，我不赞成使用的，除非你有很特别的数据类型，如日志，正好可以根据日志时间来分区，方便归档。<br />
但是，你说全局索引可以提高访问性能，这个是没有任何道理的，呵呵，全局索引中保存的rowid长度还是10个字节的，比普通索引要多4个字节，这点你要清楚。<br />
另外，分区是需要另外付费的。</p>
]]></content:encoded>
				</item>
	<item>
		<title>作者: Talmud</title>
		<link>http://www.ixdba.com/html/y2007/m05/112-database-oltp-olap.html#comment-501</link>
		<author>Talmud</author>
		<pubDate>Wed, 30 May 2007 01:40:53 +0000</pubDate>
		<guid>http://www.ixdba.com/html/y2007/m05/112-database-oltp-olap.html#comment-501</guid>
					<description>好文，总结的很好，获益良多。</description>
		<content:encoded><![CDATA[<p>好文，总结的很好，获益良多。</p>
]]></content:encoded>
				</item>
	<item>
		<title>作者: wdjk1999</title>
		<link>http://www.ixdba.com/html/y2007/m05/112-database-oltp-olap.html#comment-506</link>
		<author>wdjk1999</author>
		<pubDate>Wed, 30 May 2007 02:40:29 +0000</pubDate>
		<guid>http://www.ixdba.com/html/y2007/m05/112-database-oltp-olap.html#comment-506</guid>
					<description>PINER,问题是现在很多系统都模糊了这两种的界限啊，既有ＯＬＡＰ，又有ＯＬＴＰ</description>
		<content:encoded><![CDATA[<p>PINER,问题是现在很多系统都模糊了这两种的界限啊，既有ＯＬＡＰ，又有ＯＬＴＰ</p>
]]></content:encoded>
				</item>
	<item>
		<title>作者: piner</title>
		<link>http://www.ixdba.com/html/y2007/m05/112-database-oltp-olap.html#comment-508</link>
		<author>piner</author>
		<pubDate>Wed, 30 May 2007 02:57:44 +0000</pubDate>
		<guid>http://www.ixdba.com/html/y2007/m05/112-database-oltp-olap.html#comment-508</guid>
					<description>[quote]PINER,问题是现在很多系统都模糊了这两种的界限啊，既有ＯＬＡＰ，又有ＯＬＴＰ[/quote]

这样的系统应当是有的，但是不多，如果这样的系统存在，那很多时候是因为功能分工不明确，或者是数据量，访问量都很小。这个时候，综合考虑一下即可，利用各个部分的优点。</description>
		<content:encoded><![CDATA[<p>[quote]PINER,问题是现在很多系统都模糊了这两种的界限啊，既有ＯＬＡＰ，又有ＯＬＴＰ[/quote]</p>
<p>这样的系统应当是有的，但是不多，如果这样的系统存在，那很多时候是因为功能分工不明确，或者是数据量，访问量都很小。这个时候，综合考虑一下即可，利用各个部分的优点。</p>
]]></content:encoded>
				</item>
	<item>
		<title>作者: jacky</title>
		<link>http://www.ixdba.com/html/y2007/m05/112-database-oltp-olap.html#comment-510</link>
		<author>jacky</author>
		<pubDate>Wed, 30 May 2007 07:25:53 +0000</pubDate>
		<guid>http://www.ixdba.com/html/y2007/m05/112-database-oltp-olap.html#comment-510</guid>
					<description>收录下了，谢谢</description>
		<content:encoded><![CDATA[<p>收录下了，谢谢</p>
]]></content:encoded>
				</item>
	<item>
		<title>作者: newboy</title>
		<link>http://www.ixdba.com/html/y2007/m05/112-database-oltp-olap.html#comment-511</link>
		<author>newboy</author>
		<pubDate>Wed, 30 May 2007 08:29:36 +0000</pubDate>
		<guid>http://www.ixdba.com/html/y2007/m05/112-database-oltp-olap.html#comment-511</guid>
					<description>tom不是说能在数据库中实现的就尽量在数据库中实现吗?</description>
		<content:encoded><![CDATA[<p>tom不是说能在数据库中实现的就尽量在数据库中实现吗?</p>
]]></content:encoded>
				</item>
	<item>
		<title>作者: piner</title>
		<link>http://www.ixdba.com/html/y2007/m05/112-database-oltp-olap.html#comment-513</link>
		<author>piner</author>
		<pubDate>Wed, 30 May 2007 08:40:00 +0000</pubDate>
		<guid>http://www.ixdba.com/html/y2007/m05/112-database-oltp-olap.html#comment-513</guid>
					<description>tom的很多说法，在一些高并发，高业务量的oltp系统上，都是行不通的。

他的技术，是针对一般的小应用的。</description>
		<content:encoded><![CDATA[<p>tom的很多说法，在一些高并发，高业务量的oltp系统上，都是行不通的。</p>
<p>他的技术，是针对一般的小应用的。</p>
]]></content:encoded>
				</item>
	<item>
		<title>作者: Fenng</title>
		<link>http://www.ixdba.com/html/y2007/m05/112-database-oltp-olap.html#comment-515</link>
		<author>Fenng</author>
		<pubDate>Wed, 30 May 2007 09:24:40 +0000</pubDate>
		<guid>http://www.ixdba.com/html/y2007/m05/112-database-oltp-olap.html#comment-515</guid>
					<description>OLAP 和 DSS 也是有不少差别的</description>
		<content:encoded><![CDATA[<p>OLAP 和 DSS 也是有不少差别的</p>
]]></content:encoded>
				</item>
	<item>
		<title>作者: piner</title>
		<link>http://www.ixdba.com/html/y2007/m05/112-database-oltp-olap.html#comment-517</link>
		<author>piner</author>
		<pubDate>Wed, 30 May 2007 12:05:49 +0000</pubDate>
		<guid>http://www.ixdba.com/html/y2007/m05/112-database-oltp-olap.html#comment-517</guid>
					<description>[quote]OLAP 和 DSS 也是有不少差别的[/quote]

这两个定义现在基本一致了,不过DSS更早一些,现在基本都叫OLAP</description>
		<content:encoded><![CDATA[<p>[quote]OLAP 和 DSS 也是有不少差别的[/quote]</p>
<p>这两个定义现在基本一致了,不过DSS更早一些,现在基本都叫OLAP</p>
]]></content:encoded>
				</item>
	<item>
		<title>作者: anysql</title>
		<link>http://www.ixdba.com/html/y2007/m05/112-database-oltp-olap.html#comment-518</link>
		<author>anysql</author>
		<pubDate>Wed, 30 May 2007 12:20:41 +0000</pubDate>
		<guid>http://www.ixdba.com/html/y2007/m05/112-database-oltp-olap.html#comment-518</guid>
					<description>要让他们跑得快, 都有DBA的任务, 这是共同点.</description>
		<content:encoded><![CDATA[<p>要让他们跑得快, 都有DBA的任务, 这是共同点.</p>
]]></content:encoded>
				</item>
	<item>
		<title>作者: piner</title>
		<link>http://www.ixdba.com/html/y2007/m05/112-database-oltp-olap.html#comment-519</link>
		<author>piner</author>
		<pubDate>Wed, 30 May 2007 13:12:15 +0000</pubDate>
		<guid>http://www.ixdba.com/html/y2007/m05/112-database-oltp-olap.html#comment-519</guid>
					<description>恩,这就是你与我存在的原因.</description>
		<content:encoded><![CDATA[<p>恩,这就是你与我存在的原因.</p>
]]></content:encoded>
				</item>
	<item>
		<title>作者: 木匠</title>
		<link>http://www.ixdba.com/html/y2007/m05/112-database-oltp-olap.html#comment-523</link>
		<author>木匠</author>
		<pubDate>Wed, 30 May 2007 16:52:19 +0000</pubDate>
		<guid>http://www.ixdba.com/html/y2007/m05/112-database-oltp-olap.html#comment-523</guid>
					<description>[quote]tom的很多说法，在一些高并发，高业务量的oltp系统上，都是行不通的。
他的技术，是针对一般的小应用的。[/quote]

洗耳恭听. 请举出两三个例子, 和 complete small test case,
我真的非常有兴趣, 用事实说明问题, I always ask for proof, and maintain an open mind too.

比如: In search of the truth:
http://asktom.oracle.com/pls/ask/download_file?p_file=3067171813508366601

Piner 兄弟很果断呀, 还好, 没有删掉我的评论, 哈哈, 一笑而过.</description>
		<content:encoded><![CDATA[<p>[quote]tom的很多说法，在一些高并发，高业务量的oltp系统上，都是行不通的。<br />
他的技术，是针对一般的小应用的。[/quote]</p>
<p>洗耳恭听. 请举出两三个例子, 和 complete small test case,<br />
我真的非常有兴趣, 用事实说明问题, I always ask for proof, and maintain an open mind too.</p>
<p>比如: In search of the truth:<br />
<a href="http://asktom.oracle.com/pls/ask/download_file?p_file=3067171813508366601" rel="nofollow">http://asktom.oracle.com/pls/ask/download_file?p_file=3067171813508366601</a></p>
<p>Piner 兄弟很果断呀, 还好, 没有删掉我的评论, 哈哈, 一笑而过.</p>
]]></content:encoded>
				</item>
	<item>
		<title>作者: piner</title>
		<link>http://www.ixdba.com/html/y2007/m05/112-database-oltp-olap.html#comment-524</link>
		<author>piner</author>
		<pubDate>Thu, 31 May 2007 00:45:37 +0000</pubDate>
		<guid>http://www.ixdba.com/html/y2007/m05/112-database-oltp-olap.html#comment-524</guid>
					<description>呵呵，我为什么要删除评论？

例子很多的，我当然没有说tom是错的，但是，不同的时候，的确要注意不同的用法，tom是oracle公司的人，他的主张当然是用oracle实现一切。
但是，数据库最容易成为瓶颈，就是再高端的机器，挡不住几千台web server的，而且，他们基本可以无限制的加下去，数据库想扩展，分布？太难，不是不可以，成本非常大。

那么，我就拿一个tom经常用的例子来说明，tom在更新大批量数据的时候，主张采用最快的方式，尽量减少提交次数。这个做法，很多时候是对的，如数据仓库，停机维护，时间是宝贵的。

但是，在线系统上，你要更新100w条数据，你就不能这么做了，你要考虑这个表的压力，是否有复制，是否有触发器，是否有应用的dump等等。

更新数据的时候，还可能要根据压力，刻意的减慢更新速度，而且，更不能尽量的少提交了，而是要多提交，多提交的意思不是说每条提交一次，如，你可以1000条提交一次，减少对表的锁时间。

当然，很多人说，数据回滚的问题，数据回滚是有很多办法的，如你可以把你要更新的数据先备份起来，比如你可以分段更新，最重要的是，你要弄清楚为什么要更新，更新的风险在哪里。</description>
		<content:encoded><![CDATA[<p>呵呵，我为什么要删除评论？</p>
<p>例子很多的，我当然没有说tom是错的，但是，不同的时候，的确要注意不同的用法，tom是oracle公司的人，他的主张当然是用oracle实现一切。<br />
但是，数据库最容易成为瓶颈，就是再高端的机器，挡不住几千台web server的，而且，他们基本可以无限制的加下去，数据库想扩展，分布？太难，不是不可以，成本非常大。</p>
<p>那么，我就拿一个tom经常用的例子来说明，tom在更新大批量数据的时候，主张采用最快的方式，尽量减少提交次数。这个做法，很多时候是对的，如数据仓库，停机维护，时间是宝贵的。</p>
<p>但是，在线系统上，你要更新100w条数据，你就不能这么做了，你要考虑这个表的压力，是否有复制，是否有触发器，是否有应用的dump等等。</p>
<p>更新数据的时候，还可能要根据压力，刻意的减慢更新速度，而且，更不能尽量的少提交了，而是要多提交，多提交的意思不是说每条提交一次，如，你可以1000条提交一次，减少对表的锁时间。</p>
<p>当然，很多人说，数据回滚的问题，数据回滚是有很多办法的，如你可以把你要更新的数据先备份起来，比如你可以分段更新，最重要的是，你要弄清楚为什么要更新，更新的风险在哪里。</p>
]]></content:encoded>
				</item>
	<item>
		<title>作者: piner</title>
		<link>http://www.ixdba.com/html/y2007/m05/112-database-oltp-olap.html#comment-525</link>
		<author>piner</author>
		<pubDate>Thu, 31 May 2007 00:46:08 +0000</pubDate>
		<guid>http://www.ixdba.com/html/y2007/m05/112-database-oltp-olap.html#comment-525</guid>
					<description>更多的例子，在我的书里面。</description>
		<content:encoded><![CDATA[<p>更多的例子，在我的书里面。</p>
]]></content:encoded>
				</item>
	<item>
		<title>作者: 木匠</title>
		<link>http://www.ixdba.com/html/y2007/m05/112-database-oltp-olap.html#comment-531</link>
		<author>木匠</author>
		<pubDate>Thu, 31 May 2007 05:50:38 +0000</pubDate>
		<guid>http://www.ixdba.com/html/y2007/m05/112-database-oltp-olap.html#comment-531</guid>
					<description>[quote]更新数据的时候，还可能要根据压力，刻意的减慢更新速度，而且，更不能尽量的少提交了，而是要多提交，多提交的意思不是说每条提交一次，如，你可以1000条提交一次，减少对表的锁时间。[/quote]

这完全是数据建模设计的问题.</description>
		<content:encoded><![CDATA[<p>[quote]更新数据的时候，还可能要根据压力，刻意的减慢更新速度，而且，更不能尽量的少提交了，而是要多提交，多提交的意思不是说每条提交一次，如，你可以1000条提交一次，减少对表的锁时间。[/quote]</p>
<p>这完全是数据建模设计的问题.</p>
]]></content:encoded>
				</item>
	<item>
		<title>作者: piner</title>
		<link>http://www.ixdba.com/html/y2007/m05/112-database-oltp-olap.html#comment-532</link>
		<author>piner</author>
		<pubDate>Thu, 31 May 2007 06:05:20 +0000</pubDate>
		<guid>http://www.ixdba.com/html/y2007/m05/112-database-oltp-olap.html#comment-532</guid>
					<description>[quote]
这完全是数据建模设计的问题.[/quote]

但是，的确是在现实情况中，要去做的事情，其实，我最不主张死记硬背，生搬硬套，什么情况下，需要怎么用，再根据实际情况去决定。

我经常说的，技术做到最后，就如太极，不要去想招数了。</description>
		<content:encoded><![CDATA[<p>[quote]<br />
这完全是数据建模设计的问题.[/quote]</p>
<p>但是，的确是在现实情况中，要去做的事情，其实，我最不主张死记硬背，生搬硬套，什么情况下，需要怎么用，再根据实际情况去决定。</p>
<p>我经常说的，技术做到最后，就如太极，不要去想招数了。</p>
]]></content:encoded>
				</item>
</channel>
</rss>
