Re: Outer cost higher than the inner cost - Mailing list pgsql-performance

From Tom Lane
Subject Re: Outer cost higher than the inner cost
Date
Msg-id 1676226.1722004247@sss.pgh.pa.us
Whole thread Raw
In response to Outer cost higher than the inner cost  (Stanisław Skonieczny <stanislaw.skonieczny@gmail.com>)
List pgsql-performance
=?UTF-8?Q?Stanis=C5=82aw_Skonieczny?= <stanislaw.skonieczny@gmail.com> writes:
> What bothers me is that the inner plan cost (7430940) is higher than the
> outer plan cost (1131699).

I think it is estimating (based on knowledge of the ranges of join keys
in the two relations) that that input subplan won't need to be run to
completion.  See initial_cost_mergejoin in costsize.c.

            regards, tom lane



pgsql-performance by date:

Previous
From: Stanisław Skonieczny
Date:
Subject: Outer cost higher than the inner cost
Next
From: Jon Zeppieri
Date:
Subject: Help with row estimate problem