Database Reference
In-Depth Information
Figure 21.4
Selecting the Rows
in the
RELEASESIN2001
Table.
Next, create an index on both the CD and the SONG columns and
compress the index to save space.
CREATE INDEX RELEASES_CD_SONG
ON RELEASESIN2001 (CD, SONG) COMPRESS;
The following index is a compound index on three columns. The CD
column is sorted in descending order.
CREATE INDEX RELEASES_CD_ARTIST_SONG
ON RELEASESIN2001 (CD DESC, ARTIST, SONG);
This index is a unique index on the SONG table. Each song in this table
is unique, allowing you to create a unique index.
CREATE UNIQUE INDEX RELEASES_SONG
ON RELEASESIN2001 (SONG);
This final index is a bitmap index on the COUNTRY column. This col-
umn has very low cardinality. Low cardinality means that there are a small
number of distinct values in relation to the number of rows in the table. A
bitmap index may be appropriate.
CREATE BITMAP INDEX RELEASES_COUNTRY
 
Search WWH ::




Custom Search