pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: luis.roberto@siscobra.com.br
To: Fabrízio de Royes Mello <fabrizio@timbira.com.br>
Cc: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: Join optimization
Date: Sat, 11 Jul 2020 15:59:24 -0300 (BRT)
Message-ID: <1436239160.11622485.1594493964776.JavaMail.zimbra@siscobra.com.br> (raw)
In-Reply-To: <CAPfkCSC-NmtwZVe5Q=KLVdk6V-b1OYS9XefbccizHuS37c4g1Q@mail.gmail.com>
References: <2028783297.11609965.1594488024498.JavaMail.zimbra@siscobra.com.br>
	<CAPfkCSC-NmtwZVe5Q=KLVdk6V-b1OYS9XefbccizHuS37c4g1Q@mail.gmail.com>

I'm sorry for the bad example. 

Here is another, with some data on PG: [ https://dbfiddle.uk/?rdbms=postgres_13&fiddle=ccfd1c4fa291e74a6db9db1772e2b5ac | https://dbfiddle.uk/?rdbms=postgres_13&fiddle=ccfd1c4fa291e74a6db9db1772e2b5ac ] and Oracle: [ https://dbfiddle.uk/?rdbms=oracle_18&fiddle=21a98f499065ad4e2c35ff4bd1487e14 | https://dbfiddle.uk/?rdbms=oracle_18&fiddle=21a98f499065ad4e2c35ff4bd1487e14 ] . 

I don't understand oracle's execution plan very well, but it doesn't seem to be hitting the Users table... 


De: "Fabrízio de Royes Mello" <fabrizio@timbira.com.br> 
Para: "luis.roberto" <luis.roberto@siscobra.com.br> 
Cc: "pgsql-general" <pgsql-general@lists.postgresql.org> 
Enviadas: Sábado, 11 de julho de 2020 15:24:04 
Assunto: Re: Join optimization 


Em sáb, 11 de jul de 2020 às 14:20, < [ mailto:luis.roberto@siscobra.com.br | luis.roberto@siscobra.com.br ] > escreveu: 



Hi! 

Recently on a blogpost [1] I saw that Oracle was able to "optimize" a join strategy by completely eliminating access to a table. 

Heres the execution on Oracle 18c [2] and PostgreSQL 13 (beta) [3]. 

Is there a fundamental reason why PG can't do the same? 




It does... did you see the “never executed” notice on the Postgres explain output? 

Regards, 



BQ_BEGIN


BQ_END

-- 
Fabrízio de Royes Mello Timbira - [ http://www.timbira.com.br/ | http://www.timbira.com.br/ ] 
PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento 

view thread (5+ messages)  latest in thread

Message-ID: <1436239160.11622485.1594493964776.JavaMail.zimbra@siscobra.com.br>
Permalink:  ../1436239160.11622485.1594493964776.JavaMail.zimbra@siscobra.com.br/
Also on:    postgresql.org/message-id/1436239160.11622485.1594493964776.JavaMail.zimbra@siscobra.com.br

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: luis.roberto@siscobra.com.br, fabrizio@timbira.com.br
  Subject: Re: Join optimization
  In-Reply-To: <1436239160.11622485.1594493964776.JavaMail.zimbra@siscobra.com.br>
  References: <2028783297.11609965.1594488024498.JavaMail.zimbra@siscobra.com.br> <CAPfkCSC-NmtwZVe5Q=KLVdk6V-b1OYS9XefbccizHuS37c4g1Q@mail.gmail.com> <1436239160.11622485.1594493964776.JavaMail.zimbra@siscobra.com.br>

* 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