Database Tuning (MOSC)

MOSC Banner

index question

in Database Tuning (MOSC) 5 commentsAnswered ✓

So I have this update statement that needs to be run on a table with many records.


It's a simple statement like:


update TABLE1 set column1 = 'VALUE' where column2 = 'SOMETHING' ;


The update statement runs sort of slow, there is NO index on column2


So, just for having THIS statement run faster, it would be faster if there was an index on " column2 "


Now suppose I'm worried about locks.

To reduce the possibility on locks, I think this stament is better:


update TABLE1 set column1 = 'VALUE' where column2 = 'SOMETHING' and column1 <> 'VALUE' ;


But to have this statement be effective, I need an index on "column1" as well

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center