-
2008-06-29 20:57:41
/ IBM数据库产品
我们平时用的最多的就是select sum(数量) from表名 group by 部门,姓名 with ur;其实db2关于group by还有几个其他用法,x现将学习笔记贴出来:group by特殊说明:select DEPARTMENT,Name,sum(amount) as sum,count(*) as countfrom saleinner join Employee on liaohaibing.EMPLOYEE.ID = liaohaibing.SALE.EMPLOYEEIDinner join liaohaibing.DEPARTMENT onliaohaibing.DEPARTMENT.DEPARTMENTID = liaohaibing.EMPLOYEE.DEPARTMENTIDwhere liaohaibing.DEPARTMENT.DEPARTMENTID in(2,4,5,9)group by rollup(
查看(324)
评论(4)
-
2008-06-21 06:05:24
/ IBM数据库产品
好东西 拿出来溜溜
查看(844)
评论(13)
-
2008-03-02 23:51:27
/ IBM数据库产品
DB2DETAILDEADLOCK这个参数默认是打开的,这个参数记录了那些信息啊? 怎么来获取这些信息啊?请兄弟们指教了啊 :(
查看(459)
评论(2)
-
2008-01-20 01:40:54
/ IBM数据库产品
今天看了个文章,原文如下:原文地址:http://www.blogjava.net/tacy/archive/2007/11/24/162892.html。作者:tacy lee在应用中,我们经常会碰到sql执行很慢,但是数据库cpu和内存使用率又不高的情况,类似的问题基本上由于锁,排序等原因造成,本文主要描述如何去定位锁等待问题,谁在锁等待?等待谁持有的锁?锁在那个表?一、测试准备1、先在session1执行如下操作,创建测试表#db2 connect to eos#export DB2OPTIONS=+C#db2 "create table tacy_test (a int not null primary key,b varchar(10))"#db2 "ins
查看(666)
评论(8)
-
2008-01-17 01:08:42
/ IBM数据库产品
估计数据库的大小一般可以根据备份来看。今天在看db2 自带的存储过程的时候,发现这个GET_DBSIZE_INFO procedure可以实现类似功能,不知道大家以前有没有注意过,贴出来给大家共享下,下面是信息中心内容:7 7 7 >>-GET_DBSIZE_INFO--(--snapshot-timestamp--,--dbsize--,--------->77 >--dbcapacity--,--refresh-window--)----------------------------><77 7 The schema is SYSTOOLS.7 The GET_DBSIZE_INFO procedure calculates the database size and 7 maximum capacity. 7 The calculated values are
查看(554)
评论(9)
-
2007-12-07 01:15:04
/ IBM数据库产品
看书说db2有DB2DETAILDEADLOCK 这个参数,不是很明白了,搜索了下下面是个比较完整的说明:http://www.itpub.net/486572.html看完还是不很明白,继续搜索,发现下面的http://www.thescripts.com/forum/thread180534.html(上面的帖子有段看不懂:Also not mentioned in the article is the fact that to ensure that you get the full deadlock event monitor output to your file, turn off the event monitor (set its state to 0) before using db2evmon to dump the records, otherwise you will not get all the record
查看(597)
评论(2)