From: Andrew Dunstan <andrew@dunslane.net>
To: Simon Riggs <simon@2ndquadrant.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: josh@agliodbs.com, Greg Stark <gsstark@mit.edu>
Cc: Marko Ristola <marko.ristola@kolumbus.fi>
Cc: pgsql-perform <pgsql-performance@postgresql.org>
Cc: pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] Bad n_distinct estimation; hacks suggested?
Date: Tue, 26 Apr 2005 17:41:20 -0400
Message-ID: <426EB580.9040606@dunslane.net> (raw)
In-Reply-To: <1114547498.21529.349.camel@localhost.localdomain>
References: <200504191209.05181.josh@agliodbs.com>
<200504221336.08325.josh@agliodbs.com>
<8764ydapky.fsf@stark.xeocode.com>
<200504231639.11897.josh@agliodbs.com>
<25382.1114318139@sss.pgh.pa.us>
<1114547498.21529.349.camel@localhost.localdomain>
Simon Riggs wrote:
>The comment
> * Every value in the sample appeared more than once. Assume
> * the column has just these values.
>doesn't seem to apply when using larger samples, as Josh is using.
>
>Looking at Josh's application it does seem likely that when taking a
>sample, all site visitors clicked more than once during their session,
>especially if they include home page, adverts, images etc for each page.
>
>Could it be that we have overlooked this simple explanation and that the
>Haas and Stokes equation is actually quite good, but just not being
>applied?
>
>
>
>
No, it is being aplied. If every value in the sample appears more than
once, then f1 in the formula is 0, and the result is then just d, the
number of distinct values in the sample.
cheers
andrew
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: andrew@dunslane.net, simon@2ndquadrant.com, tgl@sss.pgh.pa.us, gsstark@mit.edu, marko.ristola@kolumbus.fi, pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] Bad n_distinct estimation; hacks suggested?
In-Reply-To: <426EB580.9040606@dunslane.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox