Re: Statistical Analysis - Mailing list pgsql-general

From Andrew McMillan
Subject Re: Statistical Analysis
Date
Msg-id 397CAC44.6934EA0E@catalyst.net.nz
Whole thread Raw
In response to RE: Statistical Analysis  ("Nathan Barnett" <nbarnett@cellularphones.com>)
List pgsql-general
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@cat-it.co.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

pgsql-general by date:

Previous
From: "Nathan Barnett"
Date:
Subject: RE: Statistical Analysis
Next
From: Herbert Liechti
Date:
Subject: Re: Web front-end