From: Tom Lane <tgl@sss.pgh.pa.us>
To: Joseph Turner <joseph.turner@oakleynetworks.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Selecting "sample" data from large tables.
Date: Thu, 03 Jun 2004 14:27:44 -0400
Message-ID: <8904.1086287264@sss.pgh.pa.us> (raw)
In-Reply-To: <200406031131.24535.joseph.turner@oakleynetworks.com>
References: <200406031131.24535.joseph.turner@oakleynetworks.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, joseph.turner@oakleynetworks.com
Subject: Re: Selecting "sample" data from large tables.
In-Reply-To: <8904.1086287264@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox