We are running same query in UAT and PROD .. In UAT it got completed in 3 mins and in prod it's taking 2 hours time.
Indexes,data in tables are same in both the env's
We ran REORG and RUNSTATS also on both the env's.
Can anyone please let me know the cause for this issue and let me know What I need to check it
have you done explain in both env. ? is it the same ?
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
Then what is the difference between UAT and Prod environments? If the explain is the same, the data, indexes, etc... Then it has to be an environmental issue, such as buffer pool sizes, sort heap, degree of parallelism, etc...
Have you compared the the snapshot of each query ( eg, data logical read, rows read )?
There must be some difference。
if you could ,you can publish the output of db2batch using the following command:
db2batch -d <dbname> -o e yes p 5 r 5 -i complete -f xxx.sql
And the execution plan is also needed ( db2exfmt).