Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make index unusable and then rebuilt in index

I have one function that insert thousands of records into table I want to unusable index at that time and then I am processing on that data data so I want to rebuilt that index again.

Is it possible in Oracle?

like image 726
chetan Avatar asked Nov 30 '25 10:11

chetan


1 Answers

alter index idx_name unusable;

alter index idx_name rebuild;

but it is possible that you'll need:

drop index idx_name

create [unique] index idx_name ...
like image 195
Florin stands with Ukraine Avatar answered Dec 03 '25 15:12

Florin stands with Ukraine



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!