经过一段时间之后,DB2 OLAP 服务器使用的表, 尤其是事实表和键标表,需要重组或整合以收回未用的空间。 数据库管理员应当使用数据库管理程序的适当工具来完成此任务。
如果使用的是 DB2,则使用 REORG 命令,如以下方案所示:
SELECT RELCUBEID, FACTTABLECOUNT FROM CUBECATALOG WHERE APPNAME='Myapp' AND CUBENAME='MyCube'
在本示例中,假设:
reorgchk on table userid.cube6fact1 reorgchk on table userid.cube6fact2 reorgchk on table userid.cube6fact3 reorgchk on table userid.cube6fact4 reorgchk on table userid.cube6keya
reorg table userid.cube6fact3 index userid.cube6findex3