dbTalk Databases Forums  

SQL with more CPU usage

comp.databases.ibm-db2 comp.databases.ibm-db2


Discuss SQL with more CPU usage in the comp.databases.ibm-db2 forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Gladiator
 
Posts: n/a

Default SQL with more CPU usage - 04-22-2011 , 12:13 AM






Hi everyone ,

Is there any way to find out the SQL using more CPU Cycles. Not the
CPU time but more CPU cycles .

Thanks in advance,
Kamal

Reply With Quote
  #2  
Old   
Frederik Engelen
 
Posts: n/a

Default Re: SQL with more CPU usage - 04-22-2011 , 03:03 AM






On 22 apr, 07:13, Gladiator <vkamalnath1... (AT) gmail (DOT) com> wrote:
Quote:
Hi everyone ,

Is there any way to find out the SQL using more CPU Cycles. Not the
CPU time but more CPU cycles .

Thanks in advance,
Kamal
Kamal,

In order to help you, we need to make sure we're talking about the
same thing. So, which difference do you see between the two (cycles
and time)?

--
Frederik Engelen

Reply With Quote
  #3  
Old   
Gladiator
 
Posts: n/a

Default Re: SQL with more CPU usage - 04-26-2011 , 03:55 AM



On Apr 22, 1:03*pm, Frederik Engelen <engelenfrede... (AT) gmail (DOT) com>
wrote:
Quote:
On 22 apr, 07:13, Gladiator <vkamalnath1... (AT) gmail (DOT) com> wrote:

Hi everyone ,

Is there any way to find out the SQL using more CPU Cycles. Not the
CPU time but more CPU cycles .

Thanks in advance,
Kamal

Kamal,

In order to help you, we need to make sure we're talking about the
same thing. So, which difference do you see between the two (cycles
and time)?

--
Frederik Engelen
Hi ,

I had a situation as below.

The system performance was slow and the CPU usage % from topas is at
100% and idle at 0%.

When i see there are some db2sysc process which has CPU usage % as 20
and there are 2-4 of these process.

I could relate the db2sysc PID with the list applications output.

db2 list applications show detail | grep -i <PID from topas>

and then take the db2 application ID from it and took a application
snapshot which i was able to produce it to the client saying these are
the SQLs causing more CPU %.


now the some days the client asks me what is the % of CPU being used
now by the same SQL. Earlier when it was running slow, i was able to
capture it from the topas and relate the corresponding DB2 application
ID from "list applications".

Now the SQL runs fast and i dont have enough time to capture the
process ID in topas.


So my question is how do we say what is the % of CPU being used by a
particular SQL.

Thanks in advance.

Kamal.

Reply With Quote
  #4  
Old   
stefan.albert
 
Posts: n/a

Default Re: SQL with more CPU usage - 04-27-2011 , 04:06 AM



This should be found in dynamic statement cache - if they are dynamic
statements.

Another way would be to use an event monitor for statements. It
includes runtime and CPU usage.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.