简体   繁体   中英

Clustered and nonclustered index - SQL Server and Oracle?

Overview of clustered and nonclustered index - not DB specific (as I understand):

Clustered Index: The physical order of data. As a result, a table can only have one clustered index.

Nonclustered Index: One or more nonclustered indexes can be configured per table. Does not directly impact the organization of the data page.

Is there a difference between how Microsoft SQL Server and Oracle 'manage' clustered and nonclustered indexes? Or is it the same across the DBS?

Any guidance would be great!

Oracle does not have a concept of a clustered index. So your premise that the question can be database agnostic is flawed. Oracle also does not have the concept of a "page" like SQL Server does.

For situations where the physical order of data in a table is truly important, Oracle allows you to define a table as an index-organized table or a single-table hash cluster. But the implementation is completely different from that of a clustered index. An index-organized table, for example, will store the table's data in the index so there is no table segment (unless you define an overflow segment).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM