I am reading Steve O'hearn 1zo-047 textbook p.404 it mentions:
A unique index is one that helps ensure that a column in a table will contain unique
information. The syntax for creating a unique index is as follows:
CREATE UNIQUE INDEX IX_EMP_SSN ON EMPLOYEES(SSN);
This is different from the UNIQUE constraint that you can apply to a column on
a table. However, note that if you create a PRIMARY KEY or UNIQUE constraint
on a table, a unique index will automatically be created along with the constraint.
Note that the UNIQUE constraint is more self-documenting within the database.
That being said, Oracle Corporation formally recommends the creation of unique
indexes to enforce uniqueness in a column, for better results in query performance.
Okay, so the bolded area has me a bit confused. Is this saying that Unique Constraint indexes are geared more towards self-documentation purposes so we should create the Unique Index explicitly?
Or is it simply mentioning that because because the UK/PK constraints self-document it is recommended to create such Constraints/Indexes.
Sorry for what may seem like a vague question, I haven't had the chance to work with index optimization, nor would I be able to efficiently navigate such a task at this point, so I thought I'd ask for tips on the forums..
Thanks.