Unique and unique code

My table holds nearly 40 million records, with DML.

I would like to know which of these unique or non-unique indexes will be the best option for implementation. To provide better performance.

Environment: Oracle 11g

+6
source share
2 answers

Use a unique index if possible. Otherwise, use a unique code.

In other words, if you can use a unique index, you should. If there is any reason why you need to record duplicate data, you have no choice yet.

If the index is guaranteed to be unique, Oracle can perform certain query plan optimizations that are not possible with an imperfect index β€” for example, if a unique index is used to determine a specific value, Oracle can stop processing further index blocks as soon as it finds a match.

+15
source

it completely depends on the type of data in the table, if it has data where uniqueness

high, then use a B-tree else using the Bitmap index.

-3
source

All Articles