Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: count(*) - sample block

Re: count(*) - sample block

From: Andy Hassall <andy_at_andyh.co.uk>
Date: Sat, 09 Dec 2006 00:00:02 +0000
Message-ID: <2qujn2ptvhjaikuhadk8jli1rj72a3e4gv@4ax.com>


On Fri, 08 Dec 2006 14:50:25 -0800, DA Morgan <damorgan_at_psoug.org> wrote:

>A bug comes to mind rather quickly after running some tests in the lab.
>I especially like this result (10.2.0.2):
>
>SQL> SELECT COUNT(*)
> 2 FROM airplanes
> 3 SAMPLE BLOCK (100);
>SAMPLE BLOCK (100)
> *
>ERROR at line 3:
>ORA-30562: SAMPLE percentage must be in the range [0.000001,100)
>
>Apparently 100 <> 100. <g>

 No, the error indicates the correct values in standard interval notation - note that the start of the range is indicated with "[" but the end with ")". Therefore, 100 is not within the valid range. The manual say says it in words:

"sample_percent For sample_percent, specify the percentage of the total row or block count to be included in the sample. The value must be in the range .000001 to, but not including, 100."

 See also http://mathworld.wolfram.com/Interval.html

-- 
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Received on Fri Dec 08 2006 - 18:00:02 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US