Is an index clustered or unclustered in Oracle?

前端 未结 4 1462
攒了一身酷
攒了一身酷 2021-01-02 07:21

How can I determine if an Oracle index is clustered or unclustered?

I\'ve done

select FIELD from TABLE where rownum <100

where

4条回答
  •  轮回少年
    2021-01-02 07:31

    "Clustered" indices, as implemented in Sybase, MS SQL Server and possibly others, where rows are physically stored in the order of the indexed column(s) don't exist as such in Oracle. "Cluster" has a different meaning in Oracle, relating, I believe, to the way blocks and tables are organized.

    Oracle does have "Index Organized Tables", which are physically equivalent, but they're used much less frequently because the query optimizer works differently.

    The closest I can get to an answer to the identification question is to try something like this:

    SELECT IOT_TYPE FROM user_tables
    WHERE table_name = ''
    

    My 10g instance reports IOT or null accordingly.

提交回复
热议问题