Re: Reading explain plans- row estimates/actuals on lower nodes vs next level up

From: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
To: Michael Lewis <mlewis(at)entrata(dot)com>
Cc: postgres performance list <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Reading explain plans- row estimates/actuals on lower nodes vs next level up
Date: 2019-10-18 00:13:34
Message-ID: 20191018001334.uhjcp7kpbj46gl5e@development
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Thu, Oct 17, 2019 at 03:15:21PM -0600, Michael Lewis wrote:
>https://explain.depesz.com/s/Caa5
>
>I am looking at this explain analyze output and seeing a nested loop
>towards the lowest levels with pretty bad estimate vs actual (2.3k vs 99k),
>but the things that feed that nested loop seem like the estimates are
>rather close (index scans with 11 estimated vs 30 actual and 3350 vs
>3320)... why does the higher node have such a different estimate vs actual
>ratio?
>

This is usually a sign of non-uniform distribution for the join columns,
and/or correlation between sides of the join.

regards

--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message dangal 2019-10-18 00:50:44 Re: pg_stat_bgwriter
Previous Message Jeff Janes 2019-10-17 23:47:10 Re: pg_stat_bgwriter