Gregory Stark <st...@enterprisedb.com> writes:
> Simon Riggs <si...@2ndquadrant.com> writes:
>> 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.

Yeah, it's a hard problem.  It's worth noting though that increasing the
default stats target 10X is already going to result in a 10X increase in
the default sample size, so we should see at least some improvement in
the typical quality of ndistinct estimates.

                        regards, tom lane

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to