Reorg
来源:互联网 发布:剑三正太捏脸数据截图 编辑:程序博客网 时间:2024/06/06 09:09
Reorg
当数据库里某个表中的记录变化量很大时,需要在表上做REORG操作来优化数据库性能。
值得注意的是,针对数据库对象的大量操作,如反复地删除表,存储过程,会引起系统表中数据的频繁改变,在这种情况下,也要考虑对系统表进行REORG操作。
一个完整的REORG表的过程应该是由下面的步骤组成的:
RUNSTATS -> REORGCHK -> REORG -> RUNSTATS -> BIND或REBIND
reorg table
[db2inst1@test1 ~]$ db2 reorg table DB2INST1.ACT inplace allow write access
生成脚本:
[db2inst1@test1 ~]$ cat reorg.sh
#!/bin/sh
echo 'date=`date +%Y-%m-%d`'
echo 'time=`date +%H:%M:%S`'
echo 'echo $date'
echo 'echo $time'
echo 'db2 connect to sample'
db2 connect to sample > /dev/null
echo "#=======reorg table==="
db2 -x "select 'db2 reorg table '||rtrim(tabschema)||'.'||tabname||' inplace allow write access' from sysstat.tables where TABSCHEMA='DB2INST1' "
echo "#=======reorg index==="
db2 -x "select 'db2 reorg indexes all for table '||rtrim(tabschema)||'.'||tabname||' allow read access' from sysstat.tables where TABSCHEMA='DB2INST1' "
echo "#=======runstats==="
db2 -x "select 'db2 runstats on table '||rtrim(tabschema)||'.'||tabname||' with distribution and indexes all' from sysstat.tables where TABSCHEMA='DB2INST1' "
- Reorg
- DB2 reorg
- db2 reorg
- reorg的使用
- DB2 REORG TABLE
- DB2 循环 ,导入, Reorg
- YOLO v2 reorg 学习
- delete client and reorg tablespaces
- db2 reorg优化及原因
- DB2 runstats、reorgchk、reorg 命令
- DB2 Online Reorg
- DB2 runstats、reorgchk、reorg 命令
- reorg和错误代码编号链接
- DB2日常维护 - 介绍REORG
- 完整的DB2 REORG案例
- estimate table size after reorg (using dbms_space)
- RREORGCHK,REORG,RUNSTATS的作用与区别
- 一次完整的DB2 reorg经历
- 投资理财幸福指数四原则
- leetcode: Letter Combinations of a Phone Number
- IAR for AVR_Proteus—联合调制
- 简单配置struts2
- java单元测试技术
- Reorg
- Spring注释@Autowired @Resource @Qualifier @Required @Resource @Component,@Service,@Controller,@Reposit
- BASH 文本模版的简单实现 micro_template_compile
- 初学maven(2)-maven/artifactory/m2eclipse安装全过程
- 30天自制操作系统(第一天)
- poj3420
- 初学maven(3)-使用nexus替代artifactory作为maven私服
- 黑马程序员_集合
- Linux查找多个类似但是不同名的文件并且重命名