Database Administration (MOSC)

MOSC Banner

Drop Index or Disable index?

edited Apr 24, 2015 12:39PM in Database Administration (MOSC) 6 commentsAnswered ✓

Plat for is Oracle Standard Edition 11.2.0.4 on Windows 2008 Server R2.

I plan to delete 20% of rows in a table. About 2 million.

I am going to delete 10,000 rows at a time.

I'm anxious about dropping the indexes. Should I just disable and rebuild them?

Is there a recommended way to disable and rebuild indexes <<actually it's clear in documentation.. don't know why I have to ask it.>>

1)

if index belongs to primary key.

ALTER TABLE DISABLE CONSTRAINT name KEEP INDEX;

And if index doesn't belong to primary but only to normal field.

ALTER INDEX DISABLE..

2)

Or just drop and recreate indexes using get_ddl?

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