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

Sort and Merge which one has better performance?


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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

Senior Member


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

PostPosted: Wed Jun 01, 2011 6:19 pm
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 Developer


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

PostPosted: Wed Jun 01, 2011 10:30 pm
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
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 Developer


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

PostPosted: Thu Jun 02, 2011 10:42 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
Search our Forums:

Back to Top