Page 1 of 1

Solution to the large look-up

Posted: Mon Jul 30, 2007 7:48 am
by nsm
Hi All,

I have a file coming in with 70,000 rows and has duplicates.For the unique combination of keys in the file I have to look up againest a DB2 table which has 70,000,000(70 million) rows.

I am thinking best way to do this is create a temorary table in DB2 with keys from the file and then do the join to the bigger table then do the rest of the processing.

Please let me know if there is any other best way to do this other than creating a DB2 Temporary table(for which I have to goto DBA)..

Thanks
nsm.

Posted: Mon Jul 30, 2007 1:53 pm
by nsm
Please let me know.

Thanks
nsm.

Posted: Mon Jul 30, 2007 3:19 pm
by ray.wurlod
The temporary table with keys is probably the best suggestion. Despite the large number of rows, being a key-only table means that it won't consume a lot of space, and the DBA won't mind you're having it. For example if you had a single integer key, the table would require less than 0.3MB.