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