473,379 Members | 1,312 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

CPU utilization

I am trying this again, since I got no reply the first time.

Is there a special register (or any other variable/function) which will
return the cpu time my sql procedure has used? Or is there a profile
product or IDE which will display the cpu time used, by statement?

I have a fairly long but simple procedure which reads two input tables
of ~20,000 rows, writes 3 tables with a combined count of < 50,000 rows
with a commit every 1,000 input rows. It is taking an inordinate amount
of both real time (> 1 hour) and cpu time. This is on a new server
(intel pentium 4 3.0GHz, linux, db2 8.1.5) and top reports that the
db2agent for this job is getting 75%-90% of the available time and no
other task is getting any appreciable amount. I have refrained from
posting the routine both because of its length (280 lines) and I really
don't want to expose my first ever db2 sql procedure.

Nov 12 '05 #1
7 1947
Ian
Robert Stearns wrote:
I am trying this again, since I got no reply the first time.

Is there a special register (or any other variable/function) which will
return the cpu time my sql procedure has used? Or is there a profile
product or IDE which will display the cpu time used, by statement?

I have a fairly long but simple procedure which reads two input tables
of ~20,000 rows, writes 3 tables with a combined count of < 50,000 rows
with a commit every 1,000 input rows. It is taking an inordinate amount
of both real time (> 1 hour) and cpu time. This is on a new server
(intel pentium 4 3.0GHz, linux, db2 8.1.5) and top reports that the
db2agent for this job is getting 75%-90% of the available time and no
other task is getting any appreciable amount. I have refrained from
posting the routine both because of its length (280 lines) and I really
don't want to expose my first ever db2 sql procedure.


You can use a statement-level event monitor to capture this information.

You may also be able to gather it using the db2batch utility, although
I'm not sure if it has visibility into fenced stored procedures.
Good luck,
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Nov 12 '05 #2
Leo
Have you tried explaining the SQL that is running in the procedure?
Maybe you have a really bad access path on some SQL. Look for bad
joins or large sorts.

Ian <ia*****@mobileaudio.com> wrote in message news:<40**********@corp.newsgroups.com>...
Robert Stearns wrote:
I am trying this again, since I got no reply the first time.

Is there a special register (or any other variable/function) which will
return the cpu time my sql procedure has used? Or is there a profile
product or IDE which will display the cpu time used, by statement?

I have a fairly long but simple procedure which reads two input tables
of ~20,000 rows, writes 3 tables with a combined count of < 50,000 rows
with a commit every 1,000 input rows. It is taking an inordinate amount
of both real time (> 1 hour) and cpu time. This is on a new server
(intel pentium 4 3.0GHz, linux, db2 8.1.5) and top reports that the
db2agent for this job is getting 75%-90% of the available time and no
other task is getting any appreciable amount. I have refrained from
posting the routine both because of its length (280 lines) and I really
don't want to expose my first ever db2 sql procedure.


You can use a statement-level event monitor to capture this information.

You may also be able to gather it using the db2batch utility, although
I'm not sure if it has visibility into fenced stored procedures.
Good luck,
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----

Nov 12 '05 #3
Leo
Have you tried explaining the SQL that is running in the procedure?
Maybe you have a really bad access path on some SQL. Look for bad
joins or large sorts.

Ian <ia*****@mobileaudio.com> wrote in message news:<40**********@corp.newsgroups.com>...
Robert Stearns wrote:
I am trying this again, since I got no reply the first time.

Is there a special register (or any other variable/function) which will
return the cpu time my sql procedure has used? Or is there a profile
product or IDE which will display the cpu time used, by statement?

I have a fairly long but simple procedure which reads two input tables
of ~20,000 rows, writes 3 tables with a combined count of < 50,000 rows
with a commit every 1,000 input rows. It is taking an inordinate amount
of both real time (> 1 hour) and cpu time. This is on a new server
(intel pentium 4 3.0GHz, linux, db2 8.1.5) and top reports that the
db2agent for this job is getting 75%-90% of the available time and no
other task is getting any appreciable amount. I have refrained from
posting the routine both because of its length (280 lines) and I really
don't want to expose my first ever db2 sql procedure.


You can use a statement-level event monitor to capture this information.

You may also be able to gather it using the db2batch utility, although
I'm not sure if it has visibility into fenced stored procedures.
Good luck,
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----

Nov 12 '05 #4
Leo wrote:
Have you tried explaining the SQL that is running in the procedure?
Maybe you have a really bad access path on some SQL. Look for bad
joins or large sorts.

Ian <ia*****@mobileaudio.com> wrote in message news:<40**********@corp.newsgroups.com>...
Robert Stearns wrote:
I am trying this again, since I got no reply the first time.

Is there a special register (or any other variable/function) which will
return the cpu time my sql procedure has used? Or is there a profile
product or IDE which will display the cpu time used, by statement?

I have a fairly long but simple procedure which reads two input tables
of ~20,000 rows, writes 3 tables with a combined count of < 50,000 rows
with a commit every 1,000 input rows. It is taking an inordinate amount
of both real time (> 1 hour) and cpu time. This is on a new server
(intel pentium 4 3.0GHz, linux, db2 8.1.5) and top reports that the
db2agent for this job is getting 75%-90% of the available time and no
other task is getting any appreciable amount. I have refrained from
posting the routine both because of its length (280 lines) and I really
don't want to expose my first ever db2 sql procedure.


You can use a statement-level event monitor to capture this information.

You may also be able to gather it using the db2batch utility, although
I'm not sure if it has visibility into fenced stored procedures.
Good luck,
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----


Is there some simple way to do this? All the SQL statements in the
procedure use some program variables, so they would be fairly cumbersome
to reproduce outside of the procedure.

Nov 12 '05 #5
Leo wrote:
Have you tried explaining the SQL that is running in the procedure?
Maybe you have a really bad access path on some SQL. Look for bad
joins or large sorts.

Ian <ia*****@mobileaudio.com> wrote in message news:<40**********@corp.newsgroups.com>...
Robert Stearns wrote:
I am trying this again, since I got no reply the first time.

Is there a special register (or any other variable/function) which will
return the cpu time my sql procedure has used? Or is there a profile
product or IDE which will display the cpu time used, by statement?

I have a fairly long but simple procedure which reads two input tables
of ~20,000 rows, writes 3 tables with a combined count of < 50,000 rows
with a commit every 1,000 input rows. It is taking an inordinate amount
of both real time (> 1 hour) and cpu time. This is on a new server
(intel pentium 4 3.0GHz, linux, db2 8.1.5) and top reports that the
db2agent for this job is getting 75%-90% of the available time and no
other task is getting any appreciable amount. I have refrained from
posting the routine both because of its length (280 lines) and I really
don't want to expose my first ever db2 sql procedure.


You can use a statement-level event monitor to capture this information.

You may also be able to gather it using the db2batch utility, although
I'm not sure if it has visibility into fenced stored procedures.
Good luck,
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----


Is there some simple way to do this? All the SQL statements in the
procedure use some program variables, so they would be fairly cumbersome
to reproduce outside of the procedure.

Nov 12 '05 #6
Leo
Have a look at db2expln. Since all the SQL in you procedure is bound
in the package associated with the proc, this tool will explain all
the SQL and write the output to a file for you to review. Snapshoting
the SQL will not reveal what is happening in your proc because
snapshots only show dynamic sql and procedues are static.
Robert Stearns <rs**********@charter.net> wrote in message news:<40************@charter.net>...
Leo wrote:
Have you tried explaining the SQL that is running in the procedure?
Maybe you have a really bad access path on some SQL. Look for bad
joins or large sorts.

Ian <ia*****@mobileaudio.com> wrote in message news:<40**********@corp.newsgroups.com>...
Robert Stearns wrote:

I am trying this again, since I got no reply the first time.

Is there a special register (or any other variable/function) which will
return the cpu time my sql procedure has used? Or is there a profile
product or IDE which will display the cpu time used, by statement?

I have a fairly long but simple procedure which reads two input tables
of ~20,000 rows, writes 3 tables with a combined count of < 50,000 rows
with a commit every 1,000 input rows. It is taking an inordinate amount
of both real time (> 1 hour) and cpu time. This is on a new server
(intel pentium 4 3.0GHz, linux, db2 8.1.5) and top reports that the
db2agent for this job is getting 75%-90% of the available time and no
other task is getting any appreciable amount. I have refrained from
posting the routine both because of its length (280 lines) and I really
don't want to expose my first ever db2 sql procedure.
You can use a statement-level event monitor to capture this information.

You may also be able to gather it using the db2batch utility, although
I'm not sure if it has visibility into fenced stored procedures.
Good luck,
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----


Is there some simple way to do this? All the SQL statements in the
procedure use some program variables, so they would be fairly cumbersome
to reproduce outside of the procedure.

Nov 12 '05 #7
Leo
Have a look at db2expln. Since all the SQL in you procedure is bound
in the package associated with the proc, this tool will explain all
the SQL and write the output to a file for you to review. Snapshoting
the SQL will not reveal what is happening in your proc because
snapshots only show dynamic sql and procedues are static.
Robert Stearns <rs**********@charter.net> wrote in message news:<40************@charter.net>...
Leo wrote:
Have you tried explaining the SQL that is running in the procedure?
Maybe you have a really bad access path on some SQL. Look for bad
joins or large sorts.

Ian <ia*****@mobileaudio.com> wrote in message news:<40**********@corp.newsgroups.com>...
Robert Stearns wrote:

I am trying this again, since I got no reply the first time.

Is there a special register (or any other variable/function) which will
return the cpu time my sql procedure has used? Or is there a profile
product or IDE which will display the cpu time used, by statement?

I have a fairly long but simple procedure which reads two input tables
of ~20,000 rows, writes 3 tables with a combined count of < 50,000 rows
with a commit every 1,000 input rows. It is taking an inordinate amount
of both real time (> 1 hour) and cpu time. This is on a new server
(intel pentium 4 3.0GHz, linux, db2 8.1.5) and top reports that the
db2agent for this job is getting 75%-90% of the available time and no
other task is getting any appreciable amount. I have refrained from
posting the routine both because of its length (280 lines) and I really
don't want to expose my first ever db2 sql procedure.
You can use a statement-level event monitor to capture this information.

You may also be able to gather it using the db2batch utility, although
I'm not sure if it has visibility into fenced stored procedures.
Good luck,
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----


Is there some simple way to do this? All the SQL statements in the
procedure use some program variables, so they would be fairly cumbersome
to reproduce outside of the procedure.

Nov 12 '05 #8

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

Similar topics

4
by: Anks | last post by:
hi I am testing my applet to servlet communication program using appletviewer. as soon as i start the applet the cpu utilization reaches to 100%.I am using apache tomcat 4.1 application...
2
by: Patrick Moore | last post by:
We have a SQL 7.0 Standard Server running on a Windows 2000 Server machine with 2 800mhz Pentium III with 2GB memory. Our front end is Access 97 and 2000 with most ADO connections for the scripts...
3
by: Dathon | last post by:
I have a Windows service that's built with .NET. The process is meant to run in the background and not suck up too much CPU time. I set the thread priority for the various threads in the service...
3
by: john | last post by:
I don't want to know what the CPU utilization is right now. I want to get the average utilization over the last, for example, hour. So I came up with a method where I would get a Process object...
0
by: dtp | last post by:
This one has got me stumped. Is there a way to figure out the utilization of each processor in an MP system? (2P and above) Right now I use the NtQuerySystemInformation API to get busy and idle...
0
by: bimalendug | last post by:
Hi All, I'm using the .NET performance counters to calculate the network utilization. But this value exceeds 100%. In most of the cases, it is very similar to the one shown in the task-manager....
0
by: spider007 | last post by:
i want to find out the CPU Utilization per application in my DB. The problem is that we have OLTP and DSS transactions happening on the same server and we are not able to convince the client that the...
0
by: PRR | last post by:
with WMI class Win32_Process i can get most details of Processes running one Pc.. except CPU utilization... THe class for CPU utilization u need to use Win32_PerfFormattedData_PerfProc_Process ...
1
by: Kaheru | last post by:
memory utilization increase? This is because when i try to keep track of the CPU utilization and memory utilization of my FTP server process (ftpserver.exe), the CPU utilization increase, but the...
7
by: balach | last post by:
hi all, i am new in .NET, some body please help me regarding calculating total cpu utilization and RAM memory utilization in percentage (Accurately) on page load event of ASP.NET. i found the...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.