Been too long since I wrote queries but this one bugs me. Two fairly
large tables (DB2 7.2 and a remote DB2 server), one needs to update
fairly often based upon some properties stored in the first (in the
remote DB). I cobbled this together and it works, but as the local
table grows performance goes to pot in a hurry
UPDATE TABLE2 SET VALID_INFO ='Y'
WHERE TABLE2.NAME = (SELECT DISTINCT TABLE1.NAME
FROM TABLE1
WHERE TABLE1.NAME
= TABLE2.NAME)
I've forgotten what the problem with the above update is exactly (been
5 years or so since I did much SQL) and would apprecitate someone
pointing out just what is causing the slowdown.
When I was doing a lot of this I had a web site that had excellent
tutorial coverage of this kind of question but I've lost the URL - any
suggestions on a good 'SQL for Dummies' site?
--
Will Honea