楼主: wangzhonnew

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

[复制链接]
论坛徽章:
0
21#
发表于 2008-10-27 11:20 | 只看该作者
用户的DB2是什么版本的,是9的话,那两个字段用XML类型应该好很多

使用道具 举报

回复
论坛徽章:
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
22#
发表于 2008-10-27 18:57 | 只看该作者
If just for overflow problem, I would change those two columns to CLOB then CREATE TABLE .... LONG IN a seperate 32K SMSTBS.

使用道具 举报

回复
招聘 : 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
23#
 楼主| 发表于 2008-10-27 20:11 | 只看该作者
原帖由 diablo2 于 2008-10-27 11:58 发表
why not try altering PCTFREE of the table?

缺点是,浪费存储

it's a good one but the problem is, when data first insert into page it was very small, and then application will give the record a big VARCHAR.... that means, even if we set PCTFREE to 50%, there's still high chance fragmentation happens, maybe will not so bad as before, but may need to do reorg often as well....

but it's a good one, really didn't thought about this

使用道具 举报

回复
招聘 : 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
24#
 楼主| 发表于 2008-10-27 20:12 | 只看该作者
原帖由 jayciedede 于 2008-10-27 12:20 发表
用户的DB2是什么版本的,是9的话,那两个字段用XML类型应该好很多

v8 fp8 unfortunatly...

sorry didn't include this info in the description

使用道具 举报

回复
招聘 : 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
25#
 楼主| 发表于 2008-10-27 20:13 | 只看该作者
原帖由 unixnewbie 于 2008-10-27 19:57 发表
If just for overflow problem, I would change those two columns to CLOB then CREATE TABLE .... LONG IN a seperate 32K SMSTBS.

CLOB or LF are large objects, there's no prefetching or pagecleaning happens to large objects...
in this case, all queries requires direct I/O when reading these 2 columns, and all INSERT/UPDATE/DELETE requires direct I/O as well.... that will cause negative performance issue for sure, we don't know how badly it will affect the system before doing any benchmark

使用道具 举报

回复
论坛徽章:
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
26#
发表于 2008-10-28 08:14 | 只看该作者
原帖由 wangzhonnew 于 27/10/2008 22:13 发表

CLOB or LF are large objects, there's no prefetching or pagecleaning happens to large objects...
in this case, all queries requires direct I/O when reading these 2 columns, and all INSERT/UPDATE/DELETE requires direct I/O as well.... that will cause negative performance issue for sure, we don't know how badly it will affect the system before doing any benchmark


Yes, but that's where FILE SYSTEM CACHING has its tribute.

使用道具 举报

回复
招聘 : 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
27#
 楼主| 发表于 2008-10-28 10:56 | 只看该作者
原帖由 unixnewbie 于 2008-10-28 09:14 发表


Yes, but that's where FILE SYSTEM CACHING has its tribute.

hmm... that's really an interesting idea, use FS cache to handle large object...
never thought about that, have you used this approach in any project before?

使用道具 举报

回复
论坛徽章:
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
28#
发表于 2008-10-29 17:02 | 只看该作者
原帖由 wangzhonnew 于 28/10/2008 12:56 发表

hmm... that's really an interesting idea, use FS cache to handle large object...
never thought about that, have you used this approach in any project before?



Using FS caching is recommended for LOB in infocenter. You may need to tune AIX's minclient/maxclient as well. Use 'vmstat -v' or 'nmon' to track how much memory the system is using for FS caching.

使用道具 举报

回复
招聘 : Linux运维
论坛徽章:
235
紫蜘蛛
日期:2007-09-26 17:05:46玉兔
日期:2007-09-26 17:05:05现任管理团队成员
日期:2011-05-07 01:45:08玉兔
日期:2006-08-29 20:38:48紫蜘蛛
日期:2007-09-26 17:05:34阿斯顿马丁
日期:2013-11-19 10:38:16奔驰
日期:2013-10-16 09:08:58红旗
日期:2014-01-09 11:57:39路虎
日期:2013-08-13 14:52:35林肯
日期:2015-05-19 13:01:16
29#
发表于 2008-10-29 20:35 | 只看该作者
新搞一个常驻内存的表,或者新建一个bufferpool,我觉得都不很合适!因为实际系统中,往往内存都是吃紧的!
clob可以考虑,但是这样即使没有over ,select 的速度应该会受到影响!

我还是觉得要提高select速度,最好是将这3列消失掉,这样要么对表增加索引!走全索引,要么就搞一个对照表,就像行压缩一样!呵呵!速度肯定很好!

使用道具 举报

回复
招聘 : 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
30#
 楼主| 发表于 2008-10-29 22:01 | 只看该作者
恩,myfriend的思路是经典思路,改变程序流程从根本上解决overflow
尽管这个是客户将要做的咚咚,不过思路不算创新

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

使用道具 举报

回复

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

本版积分规则 发表回复

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