Re: Using Exists in Simple Update?

From: Lee Parsons <Lee.Parsons_at_p99.f618.n283.z2.fidonet.org>
Date: 1995/07/15
Message-ID: <834_9507160501_at_bels.xs4all.nl>#1/1


From: lparsons_at_eskimo.com (Lee Parsons) Subject: Re: Using Exists in Simple Update? Organization: Eskimo North (206) For-Ever

> 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
--
|Fidonet:  Lee Parsons 2:283/618.99
|Internet: Lee.Parsons_at_p99.f618.n283.z2.fidonet.org
|
| Standard disclaimer: The views of this user are strictly his own.
Received on Sat Jul 15 1995 - 00:00:00 CEST

Original text of this message