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

Re: update Index Stats using Sampling

$
0
0

For me I don't think it will make a huge amount of difference to plan choice unless you don't have in place non-sampled densities.

 

When you update statistics with sampling the pages and values it reads it considers as the 'full' table from the density point of view. If you have 100 unique values and you do sampling of 10% it'll calculate that you have 10 unique values and give you a total density of 0.1 instead of 0.01. This can make a big difference to costings in some areas (unknowns/subqueries).  You might also end up with slightly less granular histograms.

For this reason the any densities that have been calculated without sampling will not be replaced with sampled densities by default. If you've never gathered a non-sampled density then you may end up reducing your density further ( I wouldn't know without checking whether aa density calculated with 30% I'd replaced when sampled with 10%)

If you don't have a non-sampled density and sont have the resources to generate them you should consider adjusting the density by a factor equal to 1/sampling percent - see sp_modifystats.


Viewing all articles
Browse latest Browse all 3587

Trending Articles



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