Unanswered: DB2 Query taking different execution times in different schemas..
I am facing a problem in DB2 (ZOS) that I could not resolve.
While running a query say in DSNV I am getting good response time. The query is getting executed as per our expectation.
But while I am running the same query in other Schemas say DSNT, the query is taking huge time to execute. I had also tried to run the query in other available schemas like DSNA,DSNB,DSNC etc.., but didn't succeed.
The Query is an Update query that fires a trigger which inserts a new record in the history table (kept as a backup/log of the records in parent table).
I had tried the following options:
1. Ran the EXPLAIN for DSNV and DSNT and found the access path to be exactly the same.
2. Ran REORG and RUNSTAT for DSNT
3. Compared the INDEXES and TRIGGERS in both DSNV and DSNT
4. CHECKED the parameters in SYSTABLES and SYSTABLESPACES and found the entries to match.