You can define local nonclustered indexes on any set of indexable columns.
Using the publishers table partitioned by range on the pub_id column as in “Global nonclustered index on partitioned table”, create a partitioned, nonclustered index on the pub_id and city columns:
create nonclustered index publish8_idx (A) on publishers(pub_id, city) local index p1, p2, p3
You can also create a partitioned, nonclustered index on the city column:
create nonclustered index publish9_idx (B) on publishers(city) local index p1, p2, p3
Figure 10-8 shows both examples of nonclustered local indexes. The graphic description of each is identical. However, you can enforce uniqueness on example A; you cannot enforce uniqueness on example B. See “Guaranteeing a unique index”.
Figure 10-8: Local nonclustered indexes
Copyright © 2005. Sybase Inc. All rights reserved. |