| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Stochastic Queries
DBMS_Plumber wrote:
> On Sep 10, 9:45 am, -CELKO- <jcelko..._at_earthlink.net> wrote:
>> You can write some proprietary kludges, but frankly they have problems >> with skewed distributions.
>> then load it with the particular random numbers I wanrted from a stat >> package. More work, but MUCH better results.
Thanks for the advice.
I think that the best one can do is (and its what I'm currently doing):
(1) Devise a query which will return all of the keys for rows from which
you wish to select randomly (let's call them the target rows) (2) Permute the returned keys (in Java, say) (3) Iteratively select, key by key, the target rows corresponding to the
first N keys in the permutation. (or generate one query with N
disjuncts in the where clause).
When the target rows are the result of a fairly complicated join, this is pretty cumbersome (and wildly slow, from my experience). But it seems that this is what I'm stuck with. Not to worry.
[snip]
Cheers,
Joe
Received on Tue Sep 25 2007 - 18:11:03 CDT
![]() |
![]() |