Re: Statistical Analysis - Mailing list pgsql-general

From Stephan Szabo
Subject Re: Statistical Analysis
Date
Msg-id 00d701bfeaa7$e66267b0$0c64010a@kick.com
Whole thread Raw
In response to Statistical Analysis  ("Nathan Barnett" <nbarnett@cellularphones.com>)
List pgsql-general
Are you grabbing a set of rows to work on in an outside app?

You may be able to get a smaller random set with:
select <whatever> from <table> order by random() limit <number>
But this will pretty much force a sort step [and if you're not limiting the
rows with a where clause, probably a full sequential scan] and could
be very expensive depending on the number or matching rows for any
limiting clauses you have.  You'd have to play with it in practice to see
if it's any faster.

----- Original Message -----
From: "Nathan Barnett" <nbarnett@cellularphones.com>
To: <pgsql-general@postgresql.org>
Sent: Monday, July 24, 2000 12:20 PM
Subject: [GENERAL] Statistical Analysis


> I am having to perform a large data analysis query fairly frequently and
the
> execution time is not exceptable, so I was looking at doing a statictical
> sample of the data to get fairly accurate results.  Is there a way to
> perform a query on a set number of random rows instead of the whole
dataset?
> I have looked through the documentation for a function that would do this,
> but I have not seen any.  If this is a RTFM type question, then feel free
to
> tell me so and point me in the right direction because I just haven't been
> able to find any info on it.




pgsql-general by date:

Previous
From: "Fetter, David M"
Date:
Subject: [General] Problems upgrading from v6.4.2 to v7.0.2
Next
From: Herbert Liechti
Date:
Subject: Re: Web front-end