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 

Question regarding DB2 unload

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


Joined: 09 May 2003
Posts: 131
Topics: 64

PostPosted: Thu Jan 27, 2022 9:58 am    Post subject: Question regarding DB2 unload Reply with quote

Hi,
I've to selectively unload data for around 50k accounts from a huge DB2 table. I have the 50k accounts in another DB2 table as well as flat file
Which is a recommended approach to do this

- SQL join between two tables
- Unload the big table to a flat file and do a SORT joinkeys between the two flat files

Thanks,
Vijay
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12365
Topics: 75
Location: San Jose

PostPosted: Thu Jan 27, 2022 10:20 am    Post subject: Reply with quote

vijay,

Do you indexes on the keys to be matched for both tables? If you have it then a SQL JOIN on both tables might be good.

If you do NOT have indexes defined, then you are better off unloading both tables to flat files and then run Joinkeys

While unloading make sure you ONLY unload the relevant fields necessary.
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
vijay
Beginner


Joined: 09 May 2003
Posts: 131
Topics: 64

PostPosted: Thu Jan 27, 2022 10:28 am    Post subject: Reply with quote

Thank you Kolusu. Majority of the files are using Indexes. I will try both and see the results on one file

Vijay
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