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
 
Sort and Merge which one has better performance?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
adrianlmk

New User


Joined: 02 Jan 2008
Posts: 11
Location: Malaysia

PostPosted: Wed Jun 01, 2011 3:15 pm    Post subject: Sort and Merge which one has better performance?
Reply with quote

Hi, I have a query on the performance perspective

I have 10 huge file (length 8092 VB and each file got 10 million record)
I need to merge all these file to a single file with a key (e.g. 10,5,CH,A)

I have 2 option to do this.

First
i can concatenate all these file by using SORTIN & SORTOUT SYSIN = SORT FILEDS=(10,5,CH,A)

Second
I can use SORTIN01, SORTIN02........SORTIN10 & SORTOUT SYSIN = MERGE FILEDS=(10,5,CH,A) --- because all this 10 file already pre-sorted with this keys.

May i know which method is better in term of PERFORMANCE.

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

Phrzby Phil

Active Member


Joined: 31 Oct 2006
Posts: 965
Location: Richmond, Virginia

PostPosted: Wed Jun 01, 2011 6:19 pm    Post subject:
Reply with quote

Well, let's think about it.

Your first proposed solution would re-sort a large number of records that had been sorted, except that you strung them together via concatenate, thereby totally unsorting the whole shebang (I'm not sure of the origin of this technical term).

Your 2nd solution takes already sorted files and then just interleaves them, each loop taking the lowest ranking top record from one of the ten files.

Hmmmmmm.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed Jun 01, 2011 10:30 pm    Post subject:
Reply with quote

In general, a MERGE is more efficient than a SORT.

However, why not try doing both yourself and see which one is more efficient yourself. That's always the best way to answer a question like that.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Thu Jun 02, 2011 5:29 am    Post subject:
Reply with quote

Frank Yaeger wrote:
In general, a MERGE is more efficient than a SORT.

Is it another tidbit from You... icon_wink.gif
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Jun 02, 2011 10:42 pm    Post subject:
Reply with quote

Yes, but a pretty well known one. Sorting is more complex than merging and generally requires the use of more resources. For example, a SORT may require the use of intermediate storage (e.g. hiperspace or work space) whereas a MERGE never does.
Back to top
View user's profile Send private message
adrianlmk

New User


Joined: 02 Jan 2008
Posts: 11
Location: Malaysia

PostPosted: Sat Jun 04, 2011 3:34 pm    Post subject:
Reply with quote

Hi everyone, thanks for giving me a lot of comment and suggestion. I think I got the answer that I want.. Thanks for your help
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts OC4 in SORT Mohan Kothakota DFSORT/ICETOOL 2 Tue Sep 12, 2017 6:30 pm
No new posts SORT Trailer Count - LRECL Output co... amorante DFSORT/ICETOOL 5 Tue Aug 29, 2017 8:57 pm

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