环境: SUSE11 SP2, DB2 10.5
设置db2set DB2_WORKLOAD=ANALYTIC
创建表t1
create table t1(
empno char(6),
firstnme varchar(12)
) organize by column;
导入数据(使用数据库sample内的表vemp), insert into t1 select empno, firstnme from vemp;
查询数据select * from t1; 直接报错 “SQL0955C Sort memory cannot be allocoated to process the statement. Reason code = “3 “. SQLSTATE=57011″, 经排查得知数据库配置SHEAPTHRES_SHR, SORTHEAP值过小, 修改如下:
db2 update db cfg using SORTHEAP 300000
db2 update db cfg using SHEAPTHRES_SHR 500000