|
Could anyone explain the differences between clustered and a non-clustered indexes to me?. Please let me know if there are any specific requirements to be used in special cases. Thank you.
(comments are locked)
|
|
The difference is that, Clustered index is unique for any given table and we can have only one clustered index on a table. The leaf level of a clustered index is the actual data and the data is resorted in case of clustered index. Whereas in case of non-clustered index the leaf level is actually a pointer to the data in rows so we can have as many non-clustered indexes as we can on the db.
(comments are locked)
|
|
(comments are locked)
|
|
When we create primary key on table,oracle automatically creates Clustered index on that column.As we can create only one primary key on table,like we can create one and only one clustered index on table. When we create any normal index on column it is by default Non clustered index. As we can create many unique indexes on table,like we can create many non clustered indexes on table.
(comments are locked)
|
|
As we can create only one primary key on table same way we can create only one clustered index on table. That means Oracle automatically creates clustered index on primary key column. As we can create many unique indexes on table same way we can create many non-clustered indexes on table. Primary key -- Clustered Index Unique Index -- Non clustered Index
(comments are locked)
|
|
Cluster index sorts the data with respect to the column on which it is applied, where as non-clustered index do not, it is just a logical sorting. Thus we can have only single clustered index and multiple non-clustered index on a table. Primary index on a table is clustered index. By default CREATE INDEX statement creates a non-clustered index
(comments are locked)
|

