Updating selectivities with optdiag input mode

The optimizer uses range and in-between selectivity values when the value of a search argument is unknown during queryoptimization. You can use optdiag to customize the server-wide default selectivity values to match the data for specific columns in your application.

The server-wide defaults are:

The following example shows how optdiag displays default values:

Statistics for column:              "city"
Last update of column statistics:   Feb  4 2008  8:42PM

     Range cell density:            0x3f634d23b702f715
#    Range cell density:            0.0023561189228464
     Total density:                 0x3f46fae98583763d
#    Total density:                 0.0007012977830773
     Range selectivity:             default used (0.33)
#    Range selectivity:             default used (0.33)
     In between selectivity:        default used (0.25)
#    In between selectivity:         default used (0.25)

To edit the selectivity values, replace the entire “default used (0.33)” or “default used (0.25)” string with a float value. The following example changes the range selectivity to .25 and the in-between selectivity to .05, using decimal values:

     Range selectivity:            0.250000000
     In between selectivity:        0.050000000