#1: Question regarding DB2 unload Author: vijay, Posted: Thu Jan 27, 2022 9:58 am 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
#2: Author: kolusu, Location: San JosePosted: Thu Jan 27, 2022 10:20 am 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.
#3: Author: vijay, Posted: Thu Jan 27, 2022 10:28 am Thank you Kolusu. Majority of the files are using Indexes. I will try both and see the results on one file