Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Q:Do you take an INDEX hit if you update the primary key with the same values.
jcl_at_lightspeed.net wrote:
>
> I was wondering if you take an index hit if the update statement sets the
> primary key to the same value it was before the update.
> If so then I would assume that leaving out the primary key would make
> the statement faster.
>
> Ex:
> Table XX
> Col pp - primary key.
> Col yy
>
> Update table xx set values pp = 'Test' , yy = 'uu' where pp = 'Test';
> Thanks for the replys.
>
> jcl.
>
> jcl_at_lightspeed.net
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/ Now offering spam-free web-based newsreading
You've already hit the index getting the records = 'TEST' and you dont want to hit it again. Does it 're-write'? Can't say for sure but, I'd leave update of PK alone except for inserts/deletes. You'd be better off. Received on Thu Apr 23 1998 - 20:25:14 CDT
![]() |
![]() |