Re: Incorrect estimation of HashJoin rows resulted from inaccurate small table statistics - Mailing list pgsql-hackers

From Tomas Vondra
Subject Re: Incorrect estimation of HashJoin rows resulted from inaccurate small table statistics
Date
Msg-id bc6251af-266a-1a42-d069-29cbf5a1cd8a@enterprisedb.com
Whole thread Raw
In response to Re: Incorrect estimation of HashJoin rows resulted from inaccurate small table statistics  (Quan Zongliang <quanzongliang@yeah.net>)
List pgsql-hackers
On 6/17/23 00:32, Quan Zongliang wrote:
> ...
>
> It's not just a small table. If a column's value is nearly unique. It
> also causes the same problem because we exclude values that occur only
> once. samplerows <= num_mcv just solves one scenario.
> Perhaps we should discard this (dups cnt > 1) restriction?
> 

But for larger tables we'll be unable to keep all the values in the MCV.
So I think this only can change things for tiny tables.


regards

-- 
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Subscription statistics are not dropped at DROP SUBSCRIPTION in some cases
Next
From: jian he
Date:
Subject: Re: Deleting prepared statements from libpq.