Re: index skip scan

From: jernigam_at_nospam.kochind.com <jernigam_at_kochind.com>
Date: Tue, 6 Jan 2009 14:57:17 -0800 (PST)
Message-ID: <19a8e76c-755b-45f5-a8f7-e17b7b1083cf_at_g3g2000pre.googlegroups.com>



I figured out how it is calculating the selectivity of the inv_trans_qty_ind2 index. First I transposed some numbers in the middle of the calculateion. It should have been 7305 instead of 7035 for the high value - the low value. Second instead of 2/num distinct, it is using 1/num distinct.

Instead of
(val1-val2)/(high value-low value)+ 2/num distinct
(Dec 5- Dec 1)/(Jan 1 2013 - Jan 1 1993) + 2/4022
4/7035+2/4022
.000568586+.00497265 = .001065 instead of .0007962

(val1-val2)/(high value-low value)+ 1/num distinct
(Dec 5- Dec 1)/(Jan 1 2013 - Jan 1 1993) + 1/4022
4/7305+2/4022
.00054757+.000248633 = 0.0007962 Received on Tue Jan 06 2009 - 16:57:17 CST

Original text of this message