Re: Stochastic Queries
From: Joe Thurbon <usenet_at_thurbon.com>
Date: Tue, 25 Sep 2007 23:11:03 GMT
Message-ID: <bAgKi.2124$H22.581_at_news-server.bigpond.net.au>
> ...
>
>
> In the first place, this does not answer the question the OP asked.
>
> My advice to the OP would be to write a Java app that generated these
> queries.
Date: Tue, 25 Sep 2007 23:11:03 GMT
Message-ID: <bAgKi.2124$H22.581_at_news-server.bigpond.net.au>
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.
>
> In the first place, this does not answer the question the OP asked.
>
> My advice to the OP would be to write a Java app that generated these
> queries.
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 Wed Sep 26 2007 - 01:11:03 CEST