Clustering indexes can be used for the following purposes:
You can have only one clustering index on a table although additional indexes on other columns in the table are permitted.
For a table that rarely changes, you might create a B-tree clustering index on a column that does not have unique values for each row, such as a postal-code column. The table itself is physically organized in blocks in such a way that the clustering index contains a pointer to the first table block that contains a given value for the clustering column.You can be sure that when the table is searched on the indexed column in a clustering index, it is read in sequential instead of nonsequential order.
Clustering is not preserved when you make changes to a table. When you insert new rows into a table organized as a B-tree clustering index, the rows are stored physically at the end of the table regardless of their clustering key value. When you update rows and change the value of the clustering column, the rows are written back into their original location in the table.
Clustering and reclustering consume a large amount of space and time. You can avoid some of these costs if you build or load the table in the desired order.
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]