Re: Join optimization

From: luis(dot)roberto(at)siscobra(dot)com(dot)br
To: Fabrízio de Royes Mello <fabrizio(at)timbira(dot)com(dot)br>
Cc: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Join optimization
Date: 2020-07-11 18:59:24
Message-ID: 1436239160.11622485.1594493964776.JavaMail.zimbra@siscobra.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(at)timbira(dot)com(dot)br>
Para: "luis.roberto" <luis(dot)roberto(at)siscobra(dot)com(dot)br>
Cc: "pgsql-general" <pgsql-general(at)lists(dot)postgresql(dot)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(dot)roberto(at)siscobra(dot)com(dot)br | luis(dot)roberto(at)siscobra(dot)com(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Rowley 2020-07-12 08:29:08 Re: Join optimization
Previous Message Fabrízio de Royes Mello 2020-07-11 18:24:04 Re: Join optimization