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 qn asked in i/v - How to reduce the execution time

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
Satish5

New User


Joined: 12 Nov 2007
Posts: 38
Location: Texas, USA

PostPosted: Sun May 24, 2009 6:15 pm    Post subject: DB2 qn asked in i/v - How to reduce the execution time
Reply with quote

Q. Suppose there are 2 tables accessed in COBOL program. Records are fetched from first table and then on the bases of those records second table is read. Presently result set for first table contains of 2000 records only. After some time result set for first table grew to 8,000,000 and program started to take long time. How to reduce the execution time. One thing I can think of was using join on key, but i/v guy was looking for some other answer.

Also are there any FAQs avialable to learn complex sql queries.

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

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sun May 24, 2009 11:29 pm    Post subject:
Reply with quote

Hello,

I believe more info is needed . . .

The simple answer is to process less rows somehow. . .

One way to reduce the number of rows processes might be to read the second table first and then read the associated table1 entries.

The question doesn't mention if all 8,000,000 rows are needed, just that they are in the result set. . .
Back to top
View user's profile Send private message
ashishsr123

New User


Joined: 06 May 2008
Posts: 33
Location: Chennai

PostPosted: Mon May 25, 2009 12:09 am    Post subject:
Reply with quote

Hi,

you can seek DBA's help. Ask him to put index's on the column used in query and use index'ed column in where clause( search faster). If this is already there re-building indexes ,would be good ( again DBA).
As for REORG on the table etc.you can RE-BIND also.
But all this DBA stuff.

If we have the query in our hand..may query can be optmized too.

That's what i could think of.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon May 25, 2009 1:40 am    Post subject:
Reply with quote

Hello,

Quote:
you can seek DBA's help.
A good idea on the job, but i suspect that is not what the interviewer was looking for. . . icon_smile.gif
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 -> Mainframe Interview Questions 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 2 Thu Jan 19, 2017 1:31 am
No new posts DD DUMMY & CPU TIME Nileshkul Testing & Performance analysis 16 Mon Dec 19, 2016 11:35 pm
This topic is locked: you cannot edit posts or make replies. Get a job submitted itself every time... arunsoods JCL & VSAM 3 Tue Nov 22, 2016 4:05 pm
No new posts Check System time(Minute) Using TIME1... balaji81_k DFSORT/ICETOOL 5 Fri Nov 11, 2016 10:53 am


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