pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ronan Dunklau <ronan.dunklau@aiven.io>
To: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: Andrey Lepikhov <a.lepikhov@postgrespro.ru>
Cc: Hywel Carver <hywel@skillerwhale.com>
Cc: pgsql-hackers@lists.postgresql.org, Konstantin Knizhnik <knizhnik@garret.ru>
Subject: Re: Removing unneeded self joins
Date: Thu, 01 Jul 2021 08:37:46 +0200
Message-ID: <4911774.fQZKmtWmdp@aivenronan> (raw)
In-Reply-To: <b17c18d9fd379ce2355c355cdb44787a452961ec.camel@cybertec.at>
References: <64486b0b-0404-e39e-322d-0801154901f3@postgrespro.ru>
	<2a6e540a-4c9f-9402-2e02-71e35fcd4dd1@postgrespro.ru>
	<b17c18d9fd379ce2355c355cdb44787a452961ec.camel@cybertec.at>

> Generally I have the impression that we are not too keen on spending
> planning time on optimizing cases that can be trivially improved by
> rewriting the query.

Well in some cases they can't, when the query is not emitting redundant 
predicates by itself but they are added by something else like a view or a RLS 
policy.
Maybe it would be worth it to allow spending a bit more time planning for 
those cases ?

Regards,

--
Ronan Dunklau







view thread (247+ messages)  latest in thread

Message-ID: <4911774.fQZKmtWmdp@aivenronan>
Permalink:  ../4911774.fQZKmtWmdp@aivenronan/
Also on:    postgresql.org/message-id/4911774.fQZKmtWmdp@aivenronan

 · 

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-hackers@postgresql.org
  Cc: ronan.dunklau@aiven.io, laurenz.albe@cybertec.at, a.lepikhov@postgrespro.ru, hywel@skillerwhale.com, knizhnik@garret.ru
  Subject: Re: Removing unneeded self joins
  In-Reply-To: <4911774.fQZKmtWmdp@aivenronan>

* 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