Question regarding DB2 unload
Select messages from
# through # FAQ
[/[Print]\]

MVSFORUMS.com -> Database

#1: Question regarding DB2 unload Author: vijay PostPosted: 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: kolusuLocation: San Jose PostPosted: 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 PostPosted: 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

Vijay



MVSFORUMS.com -> Database


output generated using printer-friendly topic mod. All times are GMT - 5 Hours

Page 1 of 1

Powered by phpBB © 2001, 2005 phpBB Group