MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Presorting of data before doing a DB2 Load replace

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
nishantrk
Beginner


Joined: 24 Mar 2006
Posts: 32
Topics: 16

PostPosted: Tue Mar 23, 2010 8:54 am    Post subject: Presorting of data before doing a DB2 Load replace Reply with quote

Does pre sorting of data ,on index keys before doing a load replace on table improve the performance ?We have many jcl in our shop which have been written in that way..but i didn't get any satisfactory answer why the extra sort step is required ,as i think DB2 LOAD using DSNUPROC
itself has a sort step ???Can anyone please explain in detail??

Thanks in advance..
Back to top
View user's profile Send private message Send e-mail
NASCAR9
Intermediate


Joined: 08 Oct 2004
Posts: 274
Topics: 52
Location: California

PostPosted: Tue Mar 23, 2010 1:22 pm    Post subject: Reply with quote

These are my thoughts:

When presorting on the Clustering Key, the data is laid down how it was designed.
A reorg may need to be run if the data was not sorted in the Clustering Key sequence.

That said, DB2 running with a ZIIP processer runs DB2 utilities very fast.

Each shop is different. You will need to test.
_________________
Thanks,
NASCAR9
Back to top
View user's profile Send private message
nishantrk
Beginner


Joined: 24 Mar 2006
Posts: 32
Topics: 16

PostPosted: Tue Mar 23, 2010 4:54 pm    Post subject: Reply with quote

Can you please explain a bit more....
If my understanding is correct then ,you mean to say ,while loading DB2 checks if the data is sorted in the Clustering Key sequence.If not then it will run a reorg utility on the data.
So the difference in performance will be due to difference in performance of SYNCSORT and DB2 reorg utility???
Back to top
View user's profile Send private message Send e-mail
NASCAR9
Intermediate


Joined: 08 Oct 2004
Posts: 274
Topics: 52
Location: California

PostPosted: Tue Mar 23, 2010 5:43 pm    Post subject: Reply with quote

What I'm telling you is:

The data will be laid down exactly how it is received. The load does not care what sequence the data is in.

The reorg is something extra you would do to put the data into sequence. It is not mandatory. The reorg should help performance if the data is out of sequence.

It's my understanding that DB2 utilities use IBM DFSORT even if you have Syncsort in your shop.
_________________
Thanks,
NASCAR9
Back to top
View user's profile Send private message
CZerfas
Intermediate


Joined: 31 Jan 2003
Posts: 211
Topics: 8

PostPosted: Wed Mar 24, 2010 5:18 am    Post subject: Reply with quote

The sort DB2 uses during a LOAD is to sort the key values of your indices on that table into the sequence needed for the index columns. The data itself is not affected by that sort.

If you want your rows to be stored in a clustered sequence into the tablespaces, it is always a good idea to presort your data before youe LOAD REPLACE it.

regards
Christian
Back to top
View user's profile Send private message
papadi
Supermod


Joined: 20 Oct 2009
Posts: 594
Topics: 1

PostPosted: Wed Mar 24, 2010 2:35 pm    Post subject: Reply with quote

Quote:
It's my understanding that DB2 utilities use IBM DFSORT even if you have Syncsort in your shop.
Not unless a copy of DFSORT is hidden within the DB2 installation material. . .

Unless LOAD works differently than other processes, the "system sort" is invoked - whether it is DFSORT, Syncsort, or some other product.
_________________
All the best,

di
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Wed Mar 24, 2010 3:05 pm    Post subject: Reply with quote

Quote:
Unless LOAD works differently than other processes, the "system sort" is invoked - whether it is DFSORT, Syncsort, or some other product.


Yes, DB2 Utilities does work differently.

DB2 Utilities has a special interface to DFSORT that allows it to use DFSORT even if DFSORT is unlicensed at the site. For more details, see:

II14047, titled 'Use of DFSORT by DB2 Utilities" at:

http://www.ibm.com/support/docview.wss?uid=isg1II14047

II14213, continuation of II14047 at:

http://www.ibm.com/support/docview.wss?uid=isg1II14213
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
papadi
Supermod


Joined: 20 Oct 2009
Posts: 594
Topics: 1

PostPosted: Wed Mar 24, 2010 3:31 pm    Post subject: Reply with quote

And there is my "new thing" to learn for today Smile

Thanks Frank.
_________________
All the best,

di
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group