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

Home -> Community -> Usenet -> c.d.o.misc -> Update Column in Where Clause (Index it?)

Update Column in Where Clause (Index it?)

From: GHouck <hksys_at_teleport.com>
Date: Fri, 03 Dec 1999 16:15:24 -0800
Message-ID: <38485D1C.2A01@teleport.com>


I tried looking for information about this situation, and am sure it has been covered; however, I was wondering if someone had some wisdom or guidelines or rules about:

  whether a column that is to be UPDATED, and is in the   WHERE clause, should be indexed?

That is, does the existence of the index slow up the UPDATE more than the lack of an index would slow the SELECT? In particular, what if the number of distinct values in the column are few? Or, is it so situation-dependent and data-dependent that no hard and fast rules exist?

There may also be additional column(s) in the WHERE clause.

For example:

  update mytable set mycolumn=<newval> where mycolumn=<oldval>

Thanks,

Geoff Houck
systems hk
hksys_at_teleport.com
http://www.teleport.com/~hksys Received on Fri Dec 03 1999 - 18:15:24 CST

Original text of this message

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