Re: Estimate versus Compute

  • From: Wolfgang Breitling <breitliw@xxxxxxxxxxxxx>
  • To: Brandon.Allen@xxxxxxxxxxx
  • Date: Mon, 25 Jul 2005 13:03:56 -0600

Are you using
a) analyze or dbms_stats
b) block sampling or row sampling

The argument for estimate > 1% causing all blocks to be read anyways goes something like this:
If you are using row sampling with 25% (for the sake of argument) and you have more than 4 rows per block on average then a random sampling of 25% (1 out of every 4 rows) is likely to give you a row from every block.
That argument of course doesn't hold if you are using block sampling. Then a 25% sample will read 1/4 of all blocks.


Allen, Brandon wrote:
Mike, I don't believe that is true.  I recently reduced from compute to 
estimate=25% and this reduced the runtime for update stats from 38 hours to 14 
hours.  I don't think it would make such a difference if it still had to visit 
every block.  I think you can specify whether your samples are based on rows or 
blocks and Oracle will automatically compute if you specify estimate >= 50%.

Regards,
Brandon



-- Regards

Wolfgang Breitling
Centrex Consulting Corporation
www.centrexcc.com
--
//www.freelists.org/webpage/oracle-l

Other related posts: