IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Which is faster join or sub query why


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sattar_engg
Warnings : 1

New User


Joined: 23 Sep 2006
Posts: 5
Location: SE

PostPosted: Wed Jan 10, 2007 3:41 pm
Reply with quote

Hi,
I have faced some question from a interviewer i could not answer few can you please answer them.

1. Which sort is faster ie Internal or External and why?
2. which is faster join or sub query why?
3. Can we open empty PS or empty VSAM file .

abdul sattar

WARNING: TITLE CHANGED
Back to top
View user's profile Send private message
muthuvel

Active User


Joined: 29 Nov 2005
Posts: 217
Location: Canada

PostPosted: Wed Jan 10, 2007 5:12 pm
Reply with quote

Quote:
1. Which sort is faster ie Internal or External and why?

External sort is faster than internal sort.For example if there are 1 million records as input and by external sort you reduce the record count to 500 and then send it to process ,similar situation in case of internal sort you pass the 1 million input record to process A and get 500 as output count.Then external sort will be preferable.


Quote:
3. Can we open empty PS or empty VSAM file .

You can open an empty PS .In case of VSAM,you can't open it as empty but initializing the VSAM using VSAMINIT will make it open .


Please Correct me if i am wrong.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Thu Jan 11, 2007 9:07 am
Reply with quote

Hello,

For the sorting part ONLY the external sort will usually perform better than the internal sort. Often the requirement is to select some information, sort it, then report on it. If the amount of data is small, running 1 COBOL step with an internal sort will perform better than the 3step (get,sort,report) process.

Depending on your shop standards, there may be more to document/turnover if you use the external sort. Two programs plus a sort step.

If you're sorting a a hundred million records, you most likely do not want an internal sort. . . .
Back to top
View user's profile Send private message
Santoshdorge

New User


Joined: 27 Jun 2006
Posts: 48
Location: Pune

PostPosted: Thu Jan 11, 2007 12:25 pm
Reply with quote

Join is efficient than the subquery So join is faster then the subquery.
Efficient in the sense time and resource usage.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts RC query -Time column CA Products 3
No new posts Dynamically pass table name to a sele... DB2 2
No new posts Query on edit primary command CLIST & REXX 5
No new posts Query on edit primary command CLIST & REXX 1
No new posts Join multiple records using splice DFSORT/ICETOOL 5
Search our Forums:

Back to Top