Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / February 2005

Tip: Looking for answers? Try searching our database.

How to analyse poor performance of the database

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
sac - 13 Feb 2005 14:53 GMT
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 !
Mark A - 13 Feb 2005 15:10 GMT
> I am using DB2 v8.1 on UNIX.
> At times the database shows extremely poor performance.
[quoted text clipped - 10 lines]
> 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.
Thiru - 14 Feb 2005 06:26 GMT
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.
Civilian_Target - 14 Feb 2005 09:22 GMT
> I am using DB2 v8.1 on UNIX.
> At times the database shows extremely poor performance.
[quoted text clipped - 4 lines]
> (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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.