1

Topic: Parallel reorganization and statistics collection on tables

Prompt how better to organize parallel reorganization of tables and statistics collection simultaneously under several tables.
Tables are scattered on 6 tabular spaces.
Server DB2 of 9.7.10 24 kernels 128  the RAM
Prompt as better.

2

Re: Parallel reorganization and statistics collection on tables

And it is simple, several scripts (a script on . It is simple-in) in .

3

Re: Parallel reorganization and statistics collection on tables

Chumakov_JA;
The administrative task scheduler

-- Create procedure which under the given table does REORG and then RUNSTATS
create or replace procedure myschema.reorg (p_tabschema varchar (128), p_tabname varchar (128))
begin
call admin_cmd (' reorg table ' || p_tabschema || '. ' || p_tabname);
call admin_cmd (' runstats on table ' || p_tabschema || '. ' || p_tabname || ' with distribution and indexes all ');
end@
-- Hang up on the schedule the task - to be fulfilled 1 time in the near future.
-- In a reality the task can be launched on performance not at once, and next time when it inside there checks, what tasks should be fulfilled
CALL SYSPROC.ADMIN_TASK_ADD
((values ' REORG / TABSCHEMA.TABNAME ');
NULL;
NULL;
1;
NULL;
' MYSCHEMA ';
' REORG ';
' VALUES ("TABSCHEMA ' ',"TABNAME") ';
NULL;
NULL)