Re: Improving N-Distinct estimation by ANALYZE
Josh Berkus <josh@agliodbs.com>
From: Josh Berkus <josh@agliodbs.com>
To:
Cc: pgsql-hackers@postgresql.org
Date: 2006-01-05T06:31:03Z
Lists: pgsql-hackers
Folks, > Nope, it's definitely proportional. As a simple example, a sample of > 500 rows in a table of 1000 rows should yeild stats estimates with 90%+ > accuracy. But a sample of 500 rows in a 600,000,000 row table is so > small as to be nearly useless; it's quite possible to get all the same > value in a random sample of < 0.1% even on a column with a D/N of 0.001. I meant "a D/N of 0.1". Sorry. --Josh