Re: Improving N-Distinct estimation by ANALYZE

From: Lukas Smith <smith(at)pooteeweet(dot)org>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Subject: Re: Improving N-Distinct estimation by ANALYZE
Date: 2006-01-09 10:52:16
Message-ID: 43C24060.8040307@pooteeweet.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Simon Riggs wrote:

> - yes, the random sampling is random - please read the code and comments
>
> - yes, I would expect the results you get. If you sample 5% of rows and
> each block has on average at least 20 rows, then we should expect the
> majority of blocks to be hit.

and it seems from the benchmark posted to this list that random is
_very_ expensive (probably because the random reads are spread out so
well, that we do alot of I/O instead of just logical I/O from some cache)

regards,
Lukas

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregor Zeitlinger 2006-01-09 11:03:46 Re: Incremental Backup Script
Previous Message Simon Riggs 2006-01-09 10:28:32 Re: Improving N-Distinct estimation by ANALYZE