473,508 Members | 2,289 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

STMTHEAP Issue

Hi All,

I was trying to benchmark a slow performing query and realized that
almost 83 seconds is being spent on prepare and only 0.001 sec is being
spent on execute. Dynamic package cache was flushed between each run
and I tried it for all optimization levels. for this i used a stmtheap
of 12288 x 4kb.

However I realised that as soon as I reduce the stmtheap to a lower
value say 4096, the prepare time goes down to almost 7 seconds, with no
change in the exec time.

Iam curious as to why this would happen? The query am running is
complex and I keep getting "SQL0437W Performance of this complex query
may be sub-optimal. Reason code:1"..

Iam hesitant to change this in production as it might impact other
queries which are performing well.

The environment is db2 v8 fp 10 suse linux es 9 with 8 procs.

Thanks for your inputs!

Oct 3 '06 #1
3 4822
Purple-D wrote:
Hi All,

I was trying to benchmark a slow performing query and realized that
almost 83 seconds is being spent on prepare and only 0.001 sec is being
spent on execute. Dynamic package cache was flushed between each run
and I tried it for all optimization levels. for this i used a stmtheap
of 12288 x 4kb.

However I realised that as soon as I reduce the stmtheap to a lower
value say 4096, the prepare time goes down to almost 7 seconds, with no
change in the exec time.

Iam curious as to why this would happen? The query am running is
complex and I keep getting "SQL0437W Performance of this complex query
may be sub-optimal. Reason code:1"..

Iam hesitant to change this in production as it might impact other
queries which are performing well.

The environment is db2 v8 fp 10 suse linux es 9 with 8 procs.
Can you downgrade the optimization level for that query using the
special register?
Is the query complex? Does it use SQL Functions (many/nested)?
Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/
Oct 3 '06 #2
Yeah thats what I did,a blanket change on our prod and uat environment
to user opmization level 2, the query is complex in terms of number of
joins however does not use functions/procs. I would think that there
should be some form of heuristic which should kick in and let db2 get
on with executing the query (which takes 0.006 secs) rather than
spending 73 secs to prepare it!.

Oh well!
Serge Rielau wrote:
Purple-D wrote:
Hi All,

I was trying to benchmark a slow performing query and realized that
almost 83 seconds is being spent on prepare and only 0.001 sec is being
spent on execute. Dynamic package cache was flushed between each run
and I tried it for all optimization levels. for this i used a stmtheap
of 12288 x 4kb.

However I realised that as soon as I reduce the stmtheap to a lower
value say 4096, the prepare time goes down to almost 7 seconds, with no
change in the exec time.

Iam curious as to why this would happen? The query am running is
complex and I keep getting "SQL0437W Performance of this complex query
may be sub-optimal. Reason code:1"..

Iam hesitant to change this in production as it might impact other
queries which are performing well.

The environment is db2 v8 fp 10 suse linux es 9 with 8 procs.
Can you downgrade the optimization level for that query using the
special register?
Is the query complex? Does it use SQL Functions (many/nested)?
Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/
Oct 4 '06 #3
Purple-D wrote:
Yeah thats what I did,a blanket change on our prod and uat environment
to user opmization level 2, the query is complex in terms of number of
joins however does not use functions/procs. I would think that there
should be some form of heuristic which should kick in and let db2 get
on with executing the query (which takes 0.006 secs) rather than
spending 73 secs to prepare it!.
Point taken. What did you have before? The recommended optimization
level for OLTP is 3. 5 is a good starting point for BI.

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/
Oct 4 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
5204
by: Paul Mateer | last post by:
Hi, I have been running some queries against a table in a my database and have noted an odd (at least it seems odd to me) performance issue. The table has approximately 5 million rows and...
7
3278
by: George Hester | last post by:
Please take a look at this google artcle: http://groups.google.com/groups?hl=en&lr=&frame=right&th=55d6f4b50f5f9382&seekm=411f370d%241%40olaf.komtel.net#link9 The op was having trouble with...
2
2454
by: Anthony Cuttitta Jr. | last post by:
We have an application that outputs several different graphs from data downloaded from our AS400. The application has worked without (this) issue for several months now, but just recently, the...
0
3534
by: Kevin Spencer | last post by:
Hi all, I am working on a service that uploads METAR weather information to the National Weather Service FTP site. The service I'm authoring is hosted on a Windows 200 server, and the NWS FTP...
2
2803
by: Ben Rush | last post by:
Hello World, Okay, I have spent the day browsing the newsgroups and reading up on article after article concerning ViewState corruption and so forth, and I have a couple questions. We...
5
2495
by: Robert | last post by:
I have a series of web applications (configured as separate applications) on a server. There is a main application at the root and then several virtual directories that are independant...
0
2204
by: Charles Leonard | last post by:
I am having yet another issue with Windows Server 2003. This time, the web service (a file import web service) appears to run except for one odd message: "ActiveX component can't create object". ...
4
3210
by: Paul | last post by:
Hi, I've been struggling with this today, I'm developing a DotNet2.0 website in C# that needs to call a long running data query. Obviously this is a good candidate for an Asynchronous call, so...
13
3476
by: SAL | last post by:
Hello, I'm trying to include a popup in the ItemTemplate of a gridview row. The ItemTemplate for the field contains a textbox and when the user clicks in the textbox I want a popup panel to show...
0
7120
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7323
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7380
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7039
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
5050
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4706
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3180
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
763
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
415
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.