On Thu, 2008-12-11 at 22:29 +0000, Gregory Stark wrote: > > And I would like it even more if the sample size increased according > to table size, since that makes ndistinct values fairly random for > large > > tables. > > Unfortunately _any_ ndistinct estimate based on a sample of the table > is going to be pretty random.
We know that constructed data distributions can destroy the effectiveness of the ndistinct estimate and make sample size irrelevant. But typical real world data distributions do improve their estimations with increased sample size and so it is worthwhile. -- Simon Riggs www.2ndQuadrant.com PostgreSQL Training, Services and Support -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers