Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Estimate sample percent question
Hi,
I've run across an anomaly while updating statistics. It appears that the sample size specified by the analyze statement is not producing the results I'd hoped for. By my calculations, the 5% estimate has a sample size of 1%, the 10% uses 1.6%, and the 40% uses 5%. Are there any known causes for this type of effect? Has anyone else encountered this before? I'm wondering if it has to do with the way the first few blocks are filled. I'm seeing this for a number of tables.
Thanks,
Russ Brooks
sapsan:SAN>analyze table bnka delete statistics;
Table analyzed.
sapsan:SAN>analyze table bnka estimate statistics sample 5 percent;
Table analyzed.
sapsan:SAN>@s
TABLE_NAME SAMPLE_SIZE
------------------------------ -----------
BNKA 580
sapsan:SAN>analyze table bnka delete statistics;
Table analyzed.
sapsan:SAN>analyze table bnka estimate statistics sample 10 percent;
Table analyzed.
sapsan:SAN>get s
1 select table_name, sample_size from user_tables
2* where table_name = 'BNKA'
TABLE_NAME SAMPLE_SIZE
------------------------------ -----------
BNKA 931
sapsan:SAN>analyze table bnka delete statistics;
Table analyzed.
sapsan:SAN>analyze table bnka estimate statistics sample 40 percent;
Table analyzed.
sapsan:SAN>get s
1 select table_name, sample_size from user_tables
2* where table_name = 'BNKA'
sapsan:SAN>r
TABLE_NAME SAMPLE_SIZE
------------------------------ -----------
BNKA 2996
sapsan:SAN>analyze table bnka compute statistics;
Table analyzed.
sapsan:SAN>get s
1 select table_name, sample_size from user_tables
2* where table_name = 'BNKA'
sapsan:SAN>r
TABLE_NAME SAMPLE_SIZE
------------------------------ -----------
BNKA 57734
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Brooks, Russ INET: Russ.Brooks_at_dayzim.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Fri Aug 30 2002 - 09:13:41 CDT
![]() |
![]() |