pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Justin Pryzby <pryzby@telsasoft.com>
To: Frits Jalvingh <jal@etc.to>
Cc: pgsql-performance@postgresql.org
Subject: Re: Postgres using nested loops despite setting enable_nestloop to false
Date: Tue, 17 Nov 2020 08:20:24 -0600
Message-ID: <20201117142024.GA24784@telsasoft.com> (raw)
In-Reply-To: <CAKhTGFXJh6QfZTTXw4Qb-7oiFwgqh7Pdz0nUKjZnayuZpwjGqg@mail.gmail.com>
References: <CAKhTGFXJh6QfZTTXw4Qb-7oiFwgqh7Pdz0nUKjZnayuZpwjGqg@mail.gmail.com>

On Tue, Nov 17, 2020 at 02:47:55PM +0100, Frits Jalvingh wrote:
> But lately while migrating to Postgres 13 (from 9.6) we found that Postgres
> does not (always) obey the enable_nestloop = false setting anymore: some
> 
> The execution plan on Postgres 13.1:

Could you send the plans under pg13 and pg9.6 as attachments ?

What is the setting of work_mem ?

I see the cost is dominated by 2*disable_cost, but I wonder whether the I/O
cost of hash joins now exceeds that.  Maybe hash_mem_multiplier helps you?

GroupAggregate  (cost=20008853763.07..20008853776.02 rows=370 width=68)                                                                                                                                                            
  Group Key: (COALESCE(adres_pe.id_s, '-1'::integer)),                                                                                                                                                                             

-- 
Justin





view thread (9+ messages)  latest in thread

Message-ID: <20201117142024.GA24784@telsasoft.com>
Permalink:  ../20201117142024.GA24784@telsasoft.com/
Also on:    postgresql.org/message-id/20201117142024.GA24784@telsasoft.com

 · 

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: pryzby@telsasoft.com, jal@etc.to
  Subject: Re: Postgres using nested loops despite setting enable_nestloop to false
  In-Reply-To: <20201117142024.GA24784@telsasoft.com>

* 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