Re: Selecting "sample" data from large tables.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joseph Turner <joseph(dot)turner(at)oakleynetworks(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Selecting "sample" data from large tables.
Date: 2004-06-03 18:27:44
Message-ID: 8904.1086287264@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Joseph Turner <joseph(dot)turner(at)oakleynetworks(dot)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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Enrico Weigelt 2004-06-03 18:45:27 Re: [SQL] SQL Spec Compliance Questions
Previous Message Bruno Wolff III 2004-06-03 18:20:25 Re: Reference with condition on other table column?