Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

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.

Re: Q:Do you take an INDEX hit if you update the primary key with the same values.

From: BobH <b-horton_at_worldnet.att.net>
Date: Thu, 23 Apr 1998 21:25:14 -0400
Message-ID: <6hopnf$i00@bgtnsc03.worldnet.att.net>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US