17. Improving Database and Query Performance : Design Issues and Performance : Key Design and Performance : Characteristics of Bad Keys
 
Share this page                  
Characteristics of Bad Keys
Bad keys have the following features:
Wide
Use wide keys with caution.
You get fewer rows per page.
Evaluating the hash function takes more time with wide keys.
A wide key deepens the index level of B-tree and ISAM logarithmically, with respect to key width. B-tree is the least affected table structure.
Consider using a surrogate key as an alternative.
Non-static
Updating the index can slow performance.
Non-uniform duplication
A mix of high and low duplication can cause inconsistent query performance.
Sequential
Sequential keys must be used with care.
ISAM tables can be lopsided and the overflow chains can cause concurrency problems.
Control sequential key problems with a frequent modify schedule.