Overview of Clusters (238)

tsinglee發表於2007-11-21

Clusters are an optional method of storing table data. A cluster is a group of tables
that share the same data blocks because they share common columns and are often
used together. For example, the employees and departments table share the
department_id column. When you cluster the employees and departments
tables, Oracle physically stores all rows for each department from both the
employees and departments tables in the same data blocks.

Because clusters store related rows of different tables together in the same data blocks,
properly used clusters offers these benefits:
■ Disk I/O is reduced for joins of clustered tables.
■ Access time improves for joins of clustered tables.
■ In a cluster, a cluster key value is the value of the cluster key columns for a
particular row. Each cluster key value is stored only once each in the cluster and
the cluster index, no matter how many rows of different tables contain the value.
Therefore, less storage is required to store related table and index data in a cluster
than is necessary in nonclustered table format. For example, in Figure 5–10, notice
how each cluster key (each department_id) is stored just once for many rows
that contain the same value in both the employees and departments tables.


1. 簇由一組擁有相同的列且經常被一起使用的資料表構成,這組表在儲存時可共享資料塊
2. 簇有以下的優點
a. 連線簇表所需的磁碟 I/O 會減少
b. 連線簇表所需的時間將減少
c. 在一個簇中,簇鍵值是指簇鍵列distinct的值。一個簇內的由多個簇表的各個資料行所使用的相同的簇鍵值,
在簇及簇索引中只會被儲存一次。因此所需的儲存空間更少。

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10599713/viewspace-983126/,如需轉載,請註明出處,否則將追究法律責任。

相關文章