Home » SQL & PL/SQL » SQL & PL/SQL » Table Indexes
Table Indexes [message #185281] Mon, 31 July 2006 23:25 Go to next message
Matthew Waugh
Messages: 71
Registered: October 2004
Member
Let's say there is a table that is indexed on fields A, B, and C (desc).

Are these table indexes objects that can be altered? Or are they properties of a table that can be altered?

How does one view them...and alter them?

Thanks in advance.
Re: Table Indexes [message #185283 is a reply to message #185281] Tue, 01 August 2006 00:12 Go to previous messageGo to next message
Littlefoot
Messages: 20897
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Indexes can be altered - rebuilt if needed (especially after large deletes or inserts):

ALTER INDEX index_name REBUILD; [optionally, use UNRECOVERABLE]

If you'd like to combine columns differently (for example, change index from "A, B, C" to "C, A, B", you'll have to drop it first and then create a new one.

View indexes by querying USER_INDEXES and USER_IND_COLUMNS.
Re: Table Indexes [message #185294 is a reply to message #185283] Tue, 01 August 2006 01:15 Go to previous messageGo to next message
rleishman
Messages: 3724
Registered: October 2005
Location: Melbourne, Australia
Senior Member
Littlefoot wrote on Tue, 01 August 2006 15:12

Indexes can be altered - rebuilt if needed (especially after large deletes or inserts):


Do you mean "deletes or updates"? I'd like to hear a compelling argument for rebuilding an index after a lot of INSERTs.

Ross Leishman
Re: Table Indexes [message #185295 is a reply to message #185294] Tue, 01 August 2006 01:40 Go to previous message
Littlefoot
Messages: 20897
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I apologize; UPDATES is the right word. Thank you for correcting my error, Ross.
Previous Topic: when NO_DATA_FOUND not carry on ???
Next Topic: forms and reports
Goto Forum:
  


Current Time: Wed Dec 07 12:46:59 CST 2016

Total time taken to generate the page: 0.09353 seconds