From: | "Timothy H(dot) Keitt" <keitt(at)nceas(dot)ucsb(dot)edu> |
---|---|
To: | Andrew McMillan <Andrew(at)catalyst(dot)net(dot)nz> |
Cc: | Nathan Barnett <nbarnett(at)cellularphones(dot)com>, "'Stephan Szabo'" <sszabo(at)kick(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Statistical Analysis |
Date: | 2000-07-24 21:31:46 |
Message-ID: | 397CB5C2.10441378@nceas.ucsb.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Oops. Just tried that; the random() call only get evaluated once. What
you need is a column type "random" that calls random() each time its
evaluted.
T.
Andrew McMillan wrote:
>
> Nathan Barnett wrote:
> >
> > Stephan,
> > The SORT is what I'm trying to avoid because I was using a group by to grab
> > all the data in the groups that I needed, but it requires a sort to group by
> > and this bottlenecked the query. I really just wanted to grab a sample of
> > all the rows in the table and then perform the group by on the subset to
> > avoid the overhead of sorting the whole table. My query has no where
> > clauses and thus must sort through all of the data being analyzed. It then
> > aggregates the data in a table that is then being used in the realtime
> > queries. The analysis must be able to run every hour.
>
> What about using random() in the WHERE clause?
>
> Regards,
> Andrew.
> --
> _____________________________________________________________________
> Andrew McMillan, e-mail: Andrew(at)cat-it(dot)co(dot)nz
> Catalyst IT Ltd, PO Box 10-225, Level 22, 105 The Terrace, Wellington
> Me: +64 (21) 635 694, Fax: +64 (4) 499 5596, Office: +64 (4) 499 2267
--
Timothy H. Keitt
National Center for Ecological Analysis and Synthesis
735 State Street, Suite 300, Santa Barbara, CA 93101
Phone: 805-892-2519, FAX: 805-892-2510
http://www.nceas.ucsb.edu/~keitt/
From | Date | Subject | |
---|---|---|---|
Next Message | Jesus Aneiros | 2000-07-24 22:25:03 | RULES on PostgreSQL |
Previous Message | Fetter, David M | 2000-07-24 21:22:44 | RE: Clients error |