469,609 Members | 1,640 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,609 developers. It's quick & easy.

How to analyse poor performance of the database

sac
I am using DB2 v8.1 on UNIX.
At times the database shows extremely poor performance.
I do not have dba/admin rights nor do I have the web based client for
db2 v8.1.
I have only command line access.
Also DBA support starts after our jobs have completed.
(1) Is there any command that I could use from command line to find
out the process taking up maximum of the database resources ?
(2) Can the database snapshot be used for this purpose ?
(3) Is there any log created by DB2 which could be used for finding
the process consuming database resources ?

I would appreciate any help in this direction.
Thanks in advance !
Nov 12 '05 #1
3 4909

"sac" <sc******@gmail.com> wrote in message
news:15**************************@posting.google.c om...
I am using DB2 v8.1 on UNIX.
At times the database shows extremely poor performance.
I do not have dba/admin rights nor do I have the web based client for
db2 v8.1.
I have only command line access.
Also DBA support starts after our jobs have completed.
(1) Is there any command that I could use from command line to find
out the process taking up maximum of the database resources ?
(2) Can the database snapshot be used for this purpose ?
(3) Is there any log created by DB2 which could be used for finding
the process consuming database resources ?

I would appreciate any help in this direction.
Thanks in advance !


You could turn on the statement monitor and do a snapshot for dynamic
statements. It will tell you the number of times each SQL statement was
executed during the snapshot window, the total execution time, total CPU
time, etc. Then you could take the ones with high average times and do
explains on them.

But you need sysadmin authority to do the snapshots.
Nov 12 '05 #2
Hi,
If you have enough privilege(Sysadmin Authority), monitoring
switches has to be turned on. This can be done by using

update dbm cfg using <Monitoring Switch Name> on IMMEDIATE;

Then snapshot can be taken by using

get snapshot for dynamic sql on <database alias>;

Obtained output can be used for analysis purpose.

Cheers,
Thiru
WantedToBeDBA.

Nov 12 '05 #3
sac wrote:
I am using DB2 v8.1 on UNIX.
At times the database shows extremely poor performance.
I do not have dba/admin rights nor do I have the web based client for
db2 v8.1.
I have only command line access.
Also DBA support starts after our jobs have completed.
(1) Is there any command that I could use from command line to find
out the process taking up maximum of the database resources ?
Well, yes. See 2.
(2) Can the database snapshot be used for this purpose ?
Yep. You want to take a snapshot and read it. Any blaring performance
problems will generally be evident in the summary, the top 4 screenfuls
of info.

Classic performance problems would be evident from "High water mark for
connections", "Time database waited on locks" and "Deadlocks detected".
If you're getting high numbers for either of the first two, or any of
the third, your web app is probably causing DB2 performance issues.

Sometimes of course, a misconfigured DB2 server is the issue, such as
lack of indexing. For this, you should find the statement in the
"Dynamic SQL Snapshot Result" with the highest Total Execution Times.
Copy the statement text and load it into the DB2 control centre on any
server with a complete copy of the DB you're testing, and run a "Query
Plan" on it. If you can see any TSCANs, or any blaring loss of execution
time on a certain part of the statement, you should be able to either
index it, fix your code so that it never occurs, or if worst comes to
worst, set the table to volatile cardinality.
(3) Is there any log created by DB2 which could be used for finding
the process consuming database resources ?


I don't follow you here, (2) may cover it.

Civilian_Target
Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by David Gray | last post: by
1 post views Thread by Evan Smith | last post: by
3 posts views Thread by Phil Endecott | last post: by
reply views Thread by =?ISO-8859-1?Q?Konrad_M=FChler?= | last post: by
4 posts views Thread by joa2212 | last post: by
12 posts views Thread by Ilyas | last post: by
reply views Thread by devrayhaan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.