View previous topic :: View next topic |
Author |
Message |
vijay Beginner
Joined: 09 May 2003 Posts: 131 Topics: 64
|
Posted: Thu Jan 27, 2022 9:58 am Post subject: Question regarding DB2 unload |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12369 Topics: 75 Location: San Jose
|
Posted: Thu Jan 27, 2022 10:20 am Post subject: |
|
|
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
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
vijay Beginner
Joined: 09 May 2003 Posts: 131 Topics: 64
|
Posted: Thu Jan 27, 2022 10:28 am Post subject: |
|
|
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 |
|
|
|
|