Re: Update too slow !!!
Posted in 1998
I am no expert on the Informix Optimizer, but you could always try putting the contents of t2 into a temporary table. Informix may take the view that since the table is in memory (temporary stuff below about 2Mb doesn't actually hit the temp dbspace - at least on NT) and then try one of your queries below (probably not the WHERE IN one though, they're usually slower). If that doesn't work, (and this will sound odd), try putting a silly criteria on t2 which will return all rows, like maybe... update t1 set col1 = 'A', col2 = 0 where t1.id in (select recid from t2 where recid < (largest possible recid in t2 + 1) ) A silly criteria like this sometimes causes optimizers to scan t2 rather than t1. Worth a try. Pete Bloxam. (To reply please mail pete@bloxam.force9.co.uk. Do not reply to sender as an Anti Spam e-mail address was entered)