pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Michael Lewis <mlewis@entrata.com>
Cc: postgres performance list <pgsql-performance@postgresql.org>
Subject: Re: Reading explain plans- row estimates/actuals on lower nodes vs next level up
Date: Fri, 18 Oct 2019 02:13:34 +0200
Message-ID: <20191018001334.uhjcp7kpbj46gl5e@development> (raw)
In-Reply-To: <CAHOFxGo1UAF45F_fdZML1QKmSjjvN_npLx52yQv7NV6Xk=COJg@mail.gmail.com>
References: <CAHOFxGo1UAF45F_fdZML1QKmSjjvN_npLx52yQv7NV6Xk=COJg@mail.gmail.com>

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





view thread (2+ messages)

Message-ID: <20191018001334.uhjcp7kpbj46gl5e@development>
Permalink:  ../20191018001334.uhjcp7kpbj46gl5e@development/
Also on:    postgresql.org/message-id/20191018001334.uhjcp7kpbj46gl5e@development

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tomas.vondra@2ndquadrant.com, mlewis@entrata.com
  Subject: Re: Reading explain plans- row estimates/actuals on lower nodes vs next level up
  In-Reply-To: <20191018001334.uhjcp7kpbj46gl5e@development>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox