Re: Understanding bad estimate (related to FKs?)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 26, 2020 at 11:20:01AM -0600, Michael Lewis wrote:
> On Mon, Oct 26, 2020 at 11:14 AM Philip Semanchuk <philip@xxxxxxxxxxxxxxxxxxxxx> wrote:
> 
> > >> The item I'm focused on is node 23. The estimate is for 7 rows, actual
> > is 896 (multiplied by 1062 loops). I'm confused about two things in this
> > node.
> > >>
> > >> The first is Postgres' estimate. The condition for this index scan
> > contains three expressions --
> > >>
> > >> (five_uniform = zulu_five.five_uniform) AND
> > >> (whiskey_mike = juliet_india.whiskey_mike) AND
> > >> (bravo = 'mike'::text)
> >
> 
> Are the columns correlated?

I guess it shouldn't matter, since the FKs should remove all but one of the
conditions.

Maybe you saw this other thread, which I tentatively think also affects your
case (equijoin with nonjoin condition)
https://www.postgresql.org/message-id/AM6PR02MB5287A0ADD936C1FA80973E72AB190%40AM6PR02MB5287.eurprd02.prod.outlook.com






[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux