![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi all - DB2 for LUW 9.1.4...on AIX 6... Going through a PeopleSoft migration..about 3600 tables...big boss wants us to do a runstats AFTER a redirected-restore to ensure that the row-count is the same on the target DB as it was on the source...I tried to explain...etc.etc.etc... but they still want this. I did 'db2 reorgchk update statistics...' and it took 17 hours. I did a 'db2 runstats on table xyz' for the entire DB and it took 10 hours... Is there a better faster way to get CARD on syscat.tables updated? I suppose I could SELECT COUNT(*) for all tables...on source and target DB's...and write the results somewhere and compare... The entire exercise is pointless but...still...thought I'd ask....Looking for a quick thinggie here. |
#3
| |||
| |||
|
|
Reorgchk is an utility to check the requirement for a reorg - which is the activity involving de-clustering the data in a table or *index. The option of 'update statistics' does collect all the stats but it's main aim is to check for reorg and so does a lot more than just collecting stats. runstats is mainly used to collect statistics for db2 optimizer's use and it too does a lot more than collect a cardinality of the table(frequency stats, quantile stats etc). It helps DB2 to form the best access paths for any query, and it's cardinality may not be accurate when run while the table data is being modified. What you should be doing is to fire off 'select count(*)' statements and check against the source data and using the above two utilities is like going to Italy to eat a pizza. Arun On Oct 10, 3:44*pm, Bruce <bwmille... (AT) gmail (DOT) com> wrote: Hi all - DB2 for LUW 9.1.4...on AIX 6... Going through a PeopleSoft migration..about 3600 tables...big boss wants us to do a runstats AFTER a redirected-restore to ensure that the row-count is the same on the target DB as it was on the source...I tried to explain...etc.etc.etc... but they still want this. I did 'db2 reorgchk update statistics...' and it took 17 hours. I did a 'db2 runstats on table xyz' for the entire DB and it took 10 hours... Is there a better faster way to get CARD on syscat.tables updated? I suppose I could SELECT COUNT(*) for all tables...on source and target DB's...and write the results somewhere and compare... The entire exercise is pointless but...still...thought I'd ask....Looking for a quick thinggie here.- Hide quoted text - - Show quoted text - |
#4
| |||
| |||
|
#5
| |||
| |||
|
|
Hi Bruce, "A simple easier way": update sysstat.tables set card=NNN where tabschema='YOUR_TABLE_SCHEMA' and tabname='YOUR_TABLE_NAME' and you will see the same value NNN in the syscat.tables.card after that. Regards, Mark B. |
![]() |
| Thread Tools | |
| Display Modes | |
| |