Re: Optimize join selectivity estimation by not reading MCV stats for unique join attributes - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Optimize join selectivity estimation by not reading MCV stats for unique join attributes
Date
Msg-id 522124.1668179795@sss.pgh.pa.us
Whole thread Raw
In response to Optimize join selectivity estimation by not reading MCV stats for unique join attributes  (David Geier <geidav.pg@gmail.com>)
Responses Re: Optimize join selectivity estimation by not reading MCV stats for unique join attributes
List pgsql-hackers
David Geier <geidav.pg@gmail.com> writes:
> eqjoinsel() can be optimized by not reading MCV stats if at least one of 
> the two join attributes is unique.

There won't *be* any MCV stats for a column that ANALYZE perceives to
be unique, so I'm not quite sure where the claimed savings comes from.

> With this change we saw some queries improve planning time by more than 
> 2x, especially with larger values for default_statistics_target.

Please provide a concrete example.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Pavel Borisov
Date:
Subject: Re: Lockless queue of waiters in LWLock
Next
From: Tom Lane
Date:
Subject: Re: A problem about join ordering