Oracle 视图 ALL_CLUSTERING_TABLES 官方解释,作用,如何使用详细说明

本站中文解释

Oracle视图 ALL_CLUSTERING_TABLES 是一个系统保留视图,作用是用于查看当前用户所拥有的cluster的所有表的列表。这个视图用于查看哪些表存储在哪个cluster及描述这些表的信息。该视图包含以下主要列:

CLUSTER_NAME:存放表数据的cluster名称

TABLE_NAME:表名称

CLUSTERING_COLUMN:用于建立不同分区的clustering列的列名称

CLUSTERING_TYPE:使表被存储在cluster的类型

TEMPORARY:指定表在当前会话是否为临时表

利用这些列的信息,可以很方便的查看哪些表被存储在cluster中以及它们使用的clustering列名称,clustering类型等。

使用该视图的方法非常简单,只需在SQL语句中使用SELECT语句即可:

SELECT clusters_name, table_name, clustering_column, clustering_type, temporary
FROM all_clustering_tables;

这将会返回包含当前用户所有cluster中存在的有关表和clustering type 的所有信息。

官方英文解释

ALL_CLUSTERING_TABLES describes tables with an attribute clustering clause that are accessible to the user.

Related Views

  • DBA_CLUSTERING_TABLES describes all the tables with an attribute clustering clause.

  • USER_CLUSTERING_TABLES describes the tables with an attribute clustering clause owned by the user.

Column Datatype NULL Description

OWNER

VARCHAR2(128)

NOT NULL

Owner of the table

TABLE_NAME

VARCHAR2(128)

NOT NULL

Name of the table

CLUSTERING_TYPE

VARCHAR2(11)

Clustering type:

  • INTERLEAVED

  • LINEAR

ON_LOAD

VARCHAR2(3)

Indicates whether Oracle will cluster data on load (YES) or not (NO)

ON_DATAMOVEMENT

VARCHAR2(3)

Indicates whether Oracle will cluster data on data movement, for example, partition move (YES), or not (NO)

VALID

VARCHAR2(3)

Indicates if clustering is valid (YES) or not (NO).

For clustering with dimension tables, it is required that the joins of the fact table to the dimensions is via primary key or unique key on the dimension table. Therefore, dimension join keys must have a valid primary key or unique key constraint. If the primary key or unique key constraint is not valid, then clustering will not occur.

If there are no joins in the CLUSTERING clause, then the value of this column is YES.

WITH_ZONEMAP

VARCHAR2(3)

Indicates if a zonemap was created with clustering (YES) or not (NO).

LAST_LOAD_CLST

TIMESTAMP(6)

Last time the clustering occurred on load

LAST_DATAMOVE_CLST

TIMESTAMP(6)

Last time the clustering occurred on data movement, for example, partition move

See Also:

  • “DBA_CLUSTERING_TABLES”

  • “USER_CLUSTERING_TABLES”

  • The ALTER TABLE section in Oracle Database SQL
    Language Reference
    for information about using the CLUSTERING clause to create an attribute clustering table

  • The CREATE TABLE section in Oracle Database SQL
    Language Reference
    for information about using the CLUSTERING clause to create an attribute clustering table

  • Oracle Database Data
    Warehousing Guide
    for information about dimension tables

  • Oracle Database Data
    Warehousing Guide
    for information about attribute clustering with zone maps


数据运维技术 » Oracle 视图 ALL_CLUSTERING_TABLES 官方解释,作用,如何使用详细说明