Re: Improving N-Distinct estimation by ANALYZE

From: Josh Berkus <josh(at)agliodbs(dot)com>
To:
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Improving N-Distinct estimation by ANALYZE
Date: 2006-01-05 06:31:03
Message-ID: 43BCBD27.5080002@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2006-01-05 08:11:01 Re: Improving N-Distinct estimation by ANALYZE
Previous Message Josh Berkus 2006-01-05 06:28:23 Re: Improving N-Distinct estimation by ANALYZE