View previous topic :: View next topic
|
Author |
Message |
dejunzhu
Active User
Joined: 08 May 2008 Posts: 390 Location: China
|
|
|
|
I have two tables, each one contains data asof one accounting date, and these two tables are used by online transactions by turn.
If tabA is used tody, then there will be a batch job this evening which will make tabA empty, for the preparation of the next use.
Now I designed the empty job like below:
1. perform LOAD utility which loads a dummy dataset into the table, and STATISTICS parameter is specified in the LOAD statement;
(I think since the table contains tens of millions of rows before it become empty, RTS must have changed a lot, so it's necessary to gather the statistics for better performance. )
2. perform REPAIR utility which reset the COPY-PENDING status of tabA after a dummy dataset is loaded into it, as after the LOAD utility, the table is set to COPY-PENDING status. Because before the job, I have job to backup the data of the table, there should be no risk if I reset the status of the table using REPAIR utility. by the way, there is no online transaction accessing the table during batch window.
3. find out all the packages that are using the table;
4. issue REBIND command against all the packages of the previous step.
I just want to confirm if I'm doing the right thing.
Please kindly suggest. Thanks. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
Back to top |
|
|
dejunzhu
Active User
Joined: 08 May 2008 Posts: 390 Location: China
|
|
|
|
dick scherrer wrote: |
Hello,
Why not just TRUNCATE the table?
|
I suppose TRUNCATE will not gather the latest statistics for subsequent REBIND.
Please correct me if I'm wrong. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
I suppose so . . .
Not sure why you want the old stats when there will be all new data? |
|
Back to top |
|
|
dejunzhu
Active User
Joined: 08 May 2008 Posts: 390 Location: China
|
|
|
|
dick scherrer wrote: |
Hello,
Not sure why you want the old stats when there will be all new data? |
I don't want the old stats.
I update the new stats of the newly loaded data... |
|
Back to top |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
the newly loaded data = dummy so actually your runstats will reset all statistics to 0.
and (re-)binds of the programs are based on empty tables so accesspath wil be optimized for a very small table.
* if by the evening the table contains "tens of millions" it is very unlikely that these are the "best" accesspaths.
* Rebinding every day with 0-statistics is a bit overkill.
* fyi : RTS and RUNSTATS statistics are 2 different things. |
|
Back to top |
|
|
|