Quantcast
Channel: SCN: Message List - SAP Adaptive Server Enterprise (SAP ASE) for Custom Applications
Viewing all articles
Browse latest Browse all 3587

Re: hands on 'optimizer', optdiag statistics...

$
0
0

You are correct in some of your assumptions.   Because the range spans more than one histogram, we have to aggregate the two.   However in using histograms, we also use the table level selectivity for the column to predict how many of a given value within the cell there actually is.   Hence the selectivity of 0.00341.   Since it is a fairly small index, given the average rows per page, all the index LEAF rows are likely all on one page as noted. 

 

However, because you did a select *, then we need to return not only the index key value, but also the columns not contained in the index (non-covered columns).   As a result, we need to do an LIO (and possibly a PIO) for each index leaf row - which we already estimated to be 34.14.....Sooooo....we need to do 34 page lookups.    Why not just say 34 vs. 34.14.....because when doing joins and other operations, the fractions may provide a bit more accuracy.


Viewing all articles
Browse latest Browse all 3587

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>