Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 1278
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: 1278
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
This topic is locked: you cannot edit posts or make replies. Full Time COBOL Software Development ... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:24 am
No new posts CICS transaction slow response time vasanthz All Other Mainframe Topics 1 Thu Jan 19, 2017 1:31 am
No new posts BC, BCR, BRC, BRCL performance steve-myers PL/I & Assembler 0 Fri Dec 23, 2016 7:44 am
No new posts DD DUMMY & CPU TIME Nileshkul Testing & Performance analysis 16 Mon Dec 19, 2016 11:35 pm
No new posts Execessive parameter issue Sumeendar JCL & VSAM 5 Mon Dec 19, 2016 4:35 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us