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: Question regarding SAMPLE clause.

Re: Question regarding SAMPLE clause.

From: Telemachus <telemachus_at_ulysseswillreturn.net>
Date: Tue, 4 Mar 2003 17:07:29 -0000
Message-ID: <m359a.318$pK2.582@news.indigo.ie>


Duhhh... Mr. Kyte had the answer

for a 5% sample :
"Think of it like this, we goto each row -- we generate a random number between
0.00 and 1.00. If the number if 0.05 or less -- then the row is output. If the
number is above 0.05 we don't output it."

"Telemachus" <telemachus_at_ulysseswillreturn.net> wrote in message news:Wn49a.313$pK2.426_at_news.indigo.ie...
> Thanks JL ...
>
> Bug or feature I suppose is my question then ....
> "Jonathan Lewis" <jonathan_at_jlcomp.demon.co.uk> wrote in message
> news:b42ido$sf4$1$8302bc10_at_news.demon.co.uk...
> >
> > I believe you get this effect because
> > oracle generates a random set of
> > rowids - and some of the rows don't
> > exist.
> >
> >
> > --
> > Regards
> >
> > Jonathan Lewis
> > http://www.jlcomp.demon.co.uk
> >
> > Coming soon one-day tutorials:
> > Cost Based Optimisation
> > Trouble-shooting and Tuning
> > Indexing Strategies
> > (see http://www.jlcomp.demon.co.uk/tutorial.html )
> >
> > ____UK_______March 19th
> > ____UK_______April 8th
> > ____UK_______April 22nd
> >
> > ____USA_(FL)_May 2nd
> >
> >
> > Next Seminar dates:
> > (see http://www.jlcomp.demon.co.uk/seminar.html )
> >
> > ____USA_(CA, TX)_August
> >
> >
> > The Co-operative Oracle Users' FAQ
> > http://www.jlcomp.demon.co.uk/faq/ind_faq.html
> >
> >
> > "Telemachus" <telemachus_at_ulysseswillreturn.net> wrote in message
> > news:x709a.245$pK2.506_at_news.indigo.ie...
> > >
> > >
> > > The Concepts and the SQL Ref aren't too clear on this.
> > >
> > > I' like to know if SAMPLE is or is not guaranteed to return exact
> > numbers.
> > >
> > > I have a test table with 1,000,000 rows and issue a 50% sample
> > clause
> > > Are the over/under results I'm getting acceptable i.e. SAMPLE not
> > guaranteed
> > > to be exact or to within a specific percentage?
> > >
> > >
> > > The docs (Metalink 95455.1) says of the SAMPLE option "reads a
> > specified
> > > percentage and
> > > <...> examines it to see whether it satisfies the where clause "
> > >
> >
> >
> >
>
>
Received on Tue Mar 04 2003 - 11:07:29 CST

Original text of this message

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