Re: AUTO_SAMPLE_SIZE is every row
Date: Sat, 27 Jan 2018 15:12:18 +0000
Message-ID: <DB6PR1001MB1237DD01FC7D9E2B1656DB7685E70_at_DB6PR1001MB1237.EURPRD10.PROD.OUTLOOK.COM>
Mladen,
Sweeping generalisations are not helpful, and this is the 2nd time you have made this one, fishing for a response. So let me respond.
The full scan provides other benefits, by minimising additional work needed to be taken by the stats gathering job. It ensures increased accuracy of the stats, improves single-sample adaptive stat collection by understanding NULL distributions (and therefore sample escalations are proactively anticipated), and allows perfect frequency and top frequency histograms at marginal additional cost. It is needed for Hybrid histograms to replace the largely ineffectual Height-balanced histograms. It allows the use of approximate_ndv to lower the overall impact of the stats gather. All of those benefits are lost by implementing any other estimate_percent.
Neil Chandler
Database Guy.
On 01/17/2018 12:48 PM, Neil Chandler wrote:
"estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE" is the default setting from Oracle 11G and it perform a full table scan to determine the table statistics very accurately.
And for some tables, full table scan is unacceptable, regardless of the accuracy.
--
Mladen Gogala
Database Consultant
Tel: (347) 321-1217
--
http://www.freelists.org/webpage/oracle-l
Received on Sat Jan 27 2018 - 16:12:18 CET