By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,611 Members | 1,693 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,611 IT Pros & Developers. It's quick & easy.

Same statement, different application, different runtime

P: n/a
The same dynamic sql statement at the same database needs from one
application seconds and from another milliseconds.
Isolation level and optimization level are the same.
What else could be different.

Thanks
Klemens

Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Klemens wrote:
The same dynamic sql statement at the same database needs from one
application seconds and from another milliseconds.
Isolation level and optimization level are the same.
What else could be different.

Thanks
Klemens

First compare the optimizer plans.
Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #2

P: n/a
The first application is a user application and the other is the command
line prcessor. How do I get the plan used by user application if the
command line processor creates another plan.
It has to be another plan because the application get's a warning on
statement complexity which the clp doesn't get on using the same statement.
I think there has to by any option which is used by the application that is
not used by clp but I can't identfy it. Any Idea?

Thanks
Klemens

"Serge Rielau" <sr*****@ca.ibm.com> schrieb im Newsbeitrag
news:3d*************@individual.net...
Klemens wrote:
The same dynamic sql statement at the same database needs from one
application seconds and from another milliseconds.
Isolation level and optimization level are the same.
What else could be different.

Thanks
Klemens

First compare the optimizer plans.
Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab

Nov 12 '05 #3

P: n/a
Klemens wrote:
The first application is a user application and the other is the command
line prcessor. How do I get the plan used by user application if the
command line processor creates another plan.
It has to be another plan because the application get's a warning on
statement complexity which the clp doesn't get on using the same statement.
I think there has to by any option which is used by the application that is
not used by clp but I can't identfy it. Any Idea?

The easiest would be if you can inject:
SET CURRENT EXPLAIN MODE = YES
Before running the statement in the app.
Then use db2exfmt to get the plan.
The top header of the output will be most interesting since it lists the
context (such as optimization level).

If you don't have that freedom (production) you can go through the
Health Center in V8.2 to find the statement in the cache. IIRC you can
get the explain from the Health Center as well.

Cheers
Serge

--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.