| Scripts Home |
Indexes that have attributes with only low cardinality (few values) can be major performance problems. Another article and script, "Performance of Database Indexes", has a more detailed explanation and similar script for finding problem indexes.
#!/bin/ksh
# http://www.sofbot.com/ Steven Hauser & Associates.
# Find the indexes that have the attributes with
# low cardinality (few values). These indexes can be
# major performance problems and can sometimes be easily fixed by
# adding attributes with a large well distributed set of values.
#
# Note: Dependent on running "analyze" to load statistics for
# the optimizer.
#
# Usage example: index_check.ksh APPOWNER 5 10000
# Usage message.
usage () {
echo;
echo 'Usage: '$0 '