Re: Using Exists in Simple Update?

From: Lee Parsons <lparsons_at_eskimo.com>
Date: 1995/07/14
Message-ID: <DBqD6G.IBC_at_eskimo.com>#1/1


> update a set data = ( select data from b where b.k = a.k and rownum = 1 );

VS

update a set data = (select max(b) from b where b.k = a.k);

Thanks to all for the 1st solution. I've used it in two different cases with conflicting results. In once case I got a 50% speed up and in the other a 20% slowdown. The result was consistant but they threw me out before I could figure out what was going on. :-}

If I had been able to look at it more closely I think I would have found that the use of indexes was minimizing the use of the max.

-- 
Regards, 

Lee E. Parsons                  		
Systems Oracle DBA	 			lparsons_at_world.std.com
Received on Fri Jul 14 1995 - 00:00:00 CEST

Original text of this message