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
 

 

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: 962
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 BC, BCR, BRC, BRCL performance steve-myers PL/I & Assembler 0 Fri Dec 23, 2016 7:44 am
No new posts PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 4 Mon Dec 05, 2016 11:57 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts What are the way we can improve CPU p... Gunapala CN DB2 10 Mon Oct 24, 2016 2:16 pm


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