Re: Tables used in query not listed in EXPLAIN - Mailing list pgsql-general

From Tom Lane
Subject Re: Tables used in query not listed in EXPLAIN
Date
Msg-id 8909.1413489868@sss.pgh.pa.us
Whole thread Raw
In response to Tables used in query not listed in EXPLAIN  (Alvaro Melo <al_nunes@atua.com.br>)
List pgsql-general
Alvaro Melo <al_nunes@atua.com.br> writes:
> I have a peculiar situation here. I'm optimizing some queries and I
> noticed that EXPLAIN doesn't always show the tables involved in the
> query. Below is a little example, but I have other examples with longer
> queries. Note that the tables tabela_documento_fiscal and pessoa aren't
> considered on it's output. Am I missing someting or it might be a bug?

It looks to me like it's optimizing away the left joins, presumably
on the grounds that they join to a unique key so there can't be more
than one matching row --- and this query has no need to know exactly
which row, if any, matches.

            regards, tom lane


pgsql-general by date:

Previous
From: Alvaro Melo
Date:
Subject: Tables used in query not listed in EXPLAIN
Next
From: Emi Lu
Date:
Subject: CopyManager(In/out) vs. delete/insert directly