Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
DB2 - Performance issue due to Wait time

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
ganeshprasanna

New User


Joined: 21 Feb 2009
Posts: 36
Location: South Portland, Maine

PostPosted: Fri Oct 01, 2010 3:20 pm    Post subject: DB2 - Performance issue due to Wait time
Reply with quote

Hello,

What could be the possible factors for a high wait time on DB2 access ?

Currently the program takes 5 CPU mins and around 1 hour of elapsed time.
Using Macro 4 Freezeframe -There is 62% wait time which mainly contributes to this elapsed time. 32% of this wait time is due to a single query straight forward query which uses all the primary keys to fetch columns of the table(huge table with 52 million records).


Query details:
Code:
           SELECT   COL1,
                    COL2,
                    .
                    .
                    .
                    COL260
            FROM    TABLE
            WHERE    A       = :A
                AND  B       = :B
                AND  C       = :C
                AND  D       = :D
                AND  E       = :E

Here A,B,C,D,E are the primary keys.

What could be the possible reason for such a high wait time for DB2 and how do i narrow down to the cause of it ?

Please let me know if any more information is required.
Your help on this would be appreciated.

Thanks,
Ganeshprasanna
Back to top
View user's profile Send private message

GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Fri Oct 01, 2010 3:50 pm    Post subject:
Reply with quote

- 1st thing is an explain so you sure it uses the Primary index.
- Is the wait time I/O wait time, Lock wait time, or CPU Wait time ?
- how many times is that statement executed ?

for IO wait :
- synchronous or asynschronous reads ?
- if stmt is executed a lot. does the input comes in order of the index or random?
- Clusterratio of the used index ? Is it clustering ?
- How long ago was the tablespace reorged ?

for Lock wait or CPU wait:
- check concurrent jobs.
Back to top
View user's profile Send private message
ganeshprasanna

New User


Joined: 21 Feb 2009
Posts: 36
Location: South Portland, Maine

PostPosted: Fri Oct 01, 2010 4:37 pm    Post subject:
Reply with quote

I can answer some of them right now..

Quote:
1st thing is an explain so you sure it uses the Primary index.

Yes. It uses the primary index.

Quote:
- Is the wait time I/O wait time, Lock wait time, or CPU Wait time ?


I got some details from BMS apptune. Which says lock time - 0.
I assume is I/O wait time.

Quote:
synchronous or asynschronous reads ?

All are synchronous reads
Quote:

- Clusterratio of the used index ? Is it clustering ?


Clusterratio - 0.66000
CLUSTERING - Y
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Fri Oct 01, 2010 7:52 pm    Post subject:
Reply with quote

synchronous reads take very long.
the reason for synchronous in stead of the much faster asynchronous :

if input is in order of PK : clusterratio = 66% for a clustering index this should be 100% and once it drops under 95% (90%) the table should get reorged.

or your input is in another order. If you sort your input (file or other cursor) in the order of the index you should start getting a lot more asynchronous reads.

if your index is huge = nlevels is high , suppose 6, then each select will need 7 getpages (6 for index and 1 for data):

when random access then it's every time 7-5 different pages (which are possible not in the bufferpool = 7-5 Synchronous IO)
when sequential almost all pages will be in the buffer, and occasionally the next block of 32 pages will be read while you are processing the previous block of 32 pages (= 1 asynchronous read after each 100 selects)
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Comparing 2 Files using Current time arunsoods DFSORT/ICETOOL 5 Fri Sep 22, 2017 6:00 pm
No new posts Regarding time parameter shanthi gude JCL & VSAM 7 Mon Sep 04, 2017 2:31 pm
No new posts CONTIG for performance? JPVRoff JCL & VSAM 8 Fri Jun 09, 2017 8:39 am
No new posts DSNACCOX (can it be run on 1 db/ts, t... SRICOBSAS DB2 5 Sat May 06, 2017 12:59 am
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us