楼主: wangzhonnew

[精华] 一个由于应用程序逻辑设计的失误导致的性能问题

[复制链接]
论坛徽章:
18
ITPUB新首页上线纪念徽章
日期:2007-10-20 08:38:44马上有对象
日期:2014-02-19 11:55:14马上有钱
日期:2014-02-19 11:55:14马上有房
日期:2014-02-19 11:55:14马上有车
日期:2014-02-19 11:55:142012新春纪念徽章
日期:2012-02-13 15:09:522012新春纪念徽章
日期:2012-02-13 15:09:522012新春纪念徽章
日期:2012-02-13 15:09:522012新春纪念徽章
日期:2012-02-13 15:09:522012新春纪念徽章
日期:2012-02-13 15:09:52
31#
发表于 2008-10-30 08:30 | 只看该作者
原帖由 wangzhonnew 于 30/10/2008 00:01 发表
恩,myfriend的思路是经典思路,改变程序流程从根本上解决overflow
尽管这个是客户将要做的咚咚,不过思路不算创新

unixnewbie,如果你建议用FS cache作为缓冲的话,从aix来讲minperm和maxperm应该怎样调整才算合理?假设现在是20/80


http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.prftungd/doc/prftungd/jfs_cache_limit_maxclient.htm

Best Practice Tuning and monitoring database system performance.pdf

800.4 KB, 下载次数: 63

使用道具 举报

回复
招聘 : c/c++研发
论坛徽章:
45
技术图书徽章
日期:2014-03-10 14:09:192012新春纪念徽章
日期:2012-02-13 15:12:092012新春纪念徽章
日期:2012-02-13 15:12:092012新春纪念徽章
日期:2012-01-04 11:51:22ITPUB十周年纪念徽章
日期:2011-11-01 16:21:15现任管理团队成员
日期:2011-05-07 01:45:082011新春纪念徽章
日期:2011-01-25 15:42:562011新春纪念徽章
日期:2011-01-25 15:42:332011新春纪念徽章
日期:2011-01-25 15:42:152011新春纪念徽章
日期:2011-01-25 15:41:50
32#
 楼主| 发表于 2008-10-30 08:53 | 只看该作者
恩……下一个关于LOB得问题就是,一般的数据库服务器不会留出很多无用的内存的,这样的话实际上留给OS FS Cache得并不是很多。
这个表本身大概1百到1百五十万左右的数据,如果两列VARCHAR(15000)都转成LOB以后,在理想情况下如果所有数据都驻留FS CACHE则需要20G以上的空闲内存,恐怕一般的生产系统不会有那么多空闲。而且FS CACHE是一个global得,不可能只对于这两个LOB列CACHE,所以那样的话则需要更多的内存……对于这个问题有没有什么解决方法呢?

使用道具 举报

回复
论坛徽章:
233
天枰座
日期:2016-02-02 09:36:332012新春纪念徽章
日期:2012-01-04 11:49:54ITPUB十周年纪念徽章
日期:2011-11-01 16:19:41灰彻蛋
日期:2011-06-22 19:28:30现任管理团队成员
日期:2011-05-07 01:45:082010广州亚运会纪念徽章:拳击
日期:2011-04-08 16:56:552011新春纪念徽章
日期:2011-02-18 11:43:332011新春纪念徽章
日期:2011-01-25 15:42:562011新春纪念徽章
日期:2011-01-25 15:42:332011新春纪念徽章
日期:2011-01-25 15:42:15
33#
发表于 2008-10-30 11:27 | 只看该作者
BTW,我到目前为止,怎么都没有模拟出overflow. ... 继续模拟

使用道具 举报

回复
招聘 : c/c++研发
论坛徽章:
45
技术图书徽章
日期:2014-03-10 14:09:192012新春纪念徽章
日期:2012-02-13 15:12:092012新春纪念徽章
日期:2012-02-13 15:12:092012新春纪念徽章
日期:2012-01-04 11:51:22ITPUB十周年纪念徽章
日期:2011-11-01 16:21:15现任管理团队成员
日期:2011-05-07 01:45:082011新春纪念徽章
日期:2011-01-25 15:42:562011新春纪念徽章
日期:2011-01-25 15:42:332011新春纪念徽章
日期:2011-01-25 15:42:152011新春纪念徽章
日期:2011-01-25 15:41:50
34#
 楼主| 发表于 2008-10-30 12:24 | 只看该作者
原帖由 unixnewbie 于 2008-10-30 10:26 发表


You're not caching every LOBs at the same time, are you? My understanding of your case is that the SP is suffering from excessfive overflow, so you don't want those VARCHAR fields to adversely affect the SP. The access to VARCHAR fields is limited.

that's right, the current major bottleneck is the overflow for varchar columns. HOWEVER, it may not a good idea if the change will cause performance degradation for other operations such like INSERT or UPDATE.
Of course this approach will resolve the slowness for SELECT (because FETCH or TBSCAN will not read LOB data), however it could cause negative effect to insert/delete.

Note that the slowness will happen several days after reorg. that means right after reorg the data is organized. In that case, insert/delete/update may not have to take multiple I/Os if it's VARCHAR. After changing to LOB the performance might be affected in this "good case" (right after reorg).

But yeah, I agree that if the table is really messy and more than 60-70% records are overflowed, LOB won't make performance worse for insert/update/delete, and it will make performance good for SELECT

guess this is the coolest one i've heard in this thread (of course the best/correct approach is redesign the application, but changing to LOB is a cool one that I didn't think too much into). I just quickly thought about it when discussing with cust and thought changing to LOB would significantly decrease I/O performance. But after thinking more into it now, it's not THAT bad as it looked like....

使用道具 举报

回复
论坛徽章:
5
生肖徽章2007版:鼠
日期:2008-01-02 17:35:53生肖徽章2007版:鼠
日期:2008-01-02 17:35:53奥运会纪念徽章:体操
日期:2008-10-24 13:08:31
35#
发表于 2008-10-31 18:56 | 只看该作者
看起来有点儿费劲,很有启发。

使用道具 举报

回复
论坛徽章:
3
生肖徽章2007版:牛
日期:2009-02-17 13:26:03祖国60周年纪念徽章
日期:2009-10-09 08:28:002010新春纪念徽章
日期:2010-03-01 11:19:09
36#
发表于 2008-11-3 17:23 | 只看该作者
如何解决的?

使用道具 举报

回复
论坛徽章:
24
设计板块每日发贴之星
日期:2009-02-02 01:01:042012新春纪念徽章
日期:2012-01-04 11:53:54ITPUB十周年纪念徽章
日期:2011-11-01 16:24:042010广州亚运会纪念徽章:壁球
日期:2010-11-22 15:43:03ITPUB元老
日期:2010-11-18 13:03:452010新春纪念徽章
日期:2010-03-01 11:04:582010年世界杯参赛球队:瑞士
日期:2010-01-05 13:47:142010新春纪念徽章
日期:2010-01-04 08:33:08生肖徽章2007版:兔
日期:2009-11-01 20:09:03ITPUB8周年纪念徽章
日期:2009-10-09 21:30:11
37#
发表于 2009-2-25 14:21 | 只看该作者
那两个列数据是否会超过一个page的大小,如果没超过,是否可以在插入是预插入一些空格给update保留空间(前提是一个page至少能存一个记录的数据)。

使用道具 举报

回复
论坛徽章:
0
38#
发表于 2016-7-25 16:32 | 只看该作者
本帖最后由 xu5762173 于 2016-7-25 16:41 编辑

学习经典

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表