Monitoring Dynamic Sql, a problem. As optmizer doesn't know the bind variable to determine the access path, finds out virtually the best suited access path without bind variables in place (if i am not wrong). 40secs is the time, one of our sql reports as execution time (at run time)

But then, when the actual bind variable is substitued for the sql statment and executed, it executes in a sub second time.

Heard we can pass the bind variable to db2exfmt . Any ideas how to go about it??

How to identify the access path that it follows at run time and find the cause of slow running query.

Nagesh