Databases Reference
In-Depth Information
14. In the following screenshot, we can see the results of the last query:
How it works...
In the sample, we created the cluster
LOC_ENTRIES
to store information related to locations
and countries, which share the common
COUNTRY_ID
attribute.
After defining the cluster, we created an index on it, which is a mandatory operation to do
before the cluster can be used to store data.
We then created two tables,
CL_COUNTRIES
and
CL_LOCATIONS
, populating data from the
corresponding tables
COUNTRIES
and
LOCATIONS
of the
HR
schema. We added a column
FOO_DATA
to the
CL_LOCATIONS
table to make the row size bigger emphasizing a particular
behavior of clustered tables.
We then used the procedure
dbms_rowid.rowid_block_number
to identify the block
number of the database blocks in which the rows of both tables are stored.