I have few issues to solve..
So i need your help and expertise advice.
I'm in progress task of mimic our company's PRODUCTION db to another DB. But with only the statistics. The purpose here is, our software developers can run their queries against this Statistics DB and see their actual behavior and performance when it on real prod environment.
So i have done this with following way.
1. gather the tablespace/bufferpoo/database node group information
db2look -d <dbname> -l -o storage.txt
2. Collect the configuration and environment variable information
db2look -d <dbname> -f -fd -o config.txt
3. Collect the DDL information for all objects from production
db2look -d <dbname> -e -a -m -o db2look.txt
4. Run same query in both DBs with CURRENT EXPLAIN MODE EXPLAIN
5. Collect the stats and then compare
db2exfmt -d <dbname> -u <userid> <pwd> -g -o <outfile> -w -1 -n % -s % -# 0
As far this works fine and both DBs gives almost 95 - 98 % same results.
Here are the Questions i have for you.
How can i maintain the statistics time to time. I want to sync the DB every day manually the changes in statistics. How do we gonna do this
After success of 1st question i want to implement a script to detect the stat changes when i run this script and then implement it as a Cron JOB in server.
Plz advice me on this....
I know this kinda lengthy post..
But hope u guys interested in answering this..
If we do the db2look -m option every day will this can be possiable...
Cuz the db2look script include all table structure as well..
So when we run it on statistics DB will it run without errors..??
Cuz tables are already there...
Next one is
STATS_TIME in SYSCAT.TABLES.
Can you give a like to start/ more illustrations
Best Regards, Guy Przytula
Database Software Consultant
Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
Information Server Datastage Certified http://www.infocura.be