Re: Selecting "sample" data from large tables. - Mailing list pgsql-sql

From Tom Lane
Subject Re: Selecting "sample" data from large tables.
Date
Msg-id 8904.1086287264@sss.pgh.pa.us
Whole thread Raw
In response to Selecting "sample" data from large tables.  (Joseph Turner <joseph.turner@oakleynetworks.com>)
Responses Re: Selecting "sample" data from large tables.
List pgsql-sql
Joseph Turner <joseph.turner@oakleynetworks.com> writes:
> I have a table with a decent number of rows (let's say for example a
> billion rows).  I am trying to construct a graph that displays the
> distribution of that data.  However, I don't want to read in the
> complete data set (as reading a billion rows would take a while).  Can
> anyone thing of a way to do this is postgresql?

There is a fairly decent random-sampling engine inside ANALYZE, but
no way for the user to get at it :-(.  Can you make any use of
ANALYZE's results, viz the pg_stats view?
        regards, tom lane


pgsql-sql by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: Reference with condition on other table column?
Next
From: Greg Stark
Date:
Subject: Re: Selecting "sample" data from large tables.