| Scripts Home |
The indexes that have attributes with low cardinality (few values) can be major performance problems and can be fixed by adding attributes with a large well distributed set of values.
Note: This is dependent on running "analyze" to load statistics for the SQL optimizer as the statistics are queried to find the low cardinality attributes in the 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 '