Re: Query plan question - Mailing list pgsql-general

From Tom Lane
Subject Re: Query plan question
Date
Msg-id 20619.1056595996@sss.pgh.pa.us
Whole thread Raw
In response to Query plan question  ("Maksim Likharev" <mlikharev@aurigin.com>)
List pgsql-general
"Maksim Likharev" <mlikharev@aurigin.com> writes:
> I was trying to force PG do inner join 2 small tables calcs. necessary
> aggregates per id
> and only after that left outer join with the rest.

AFAICS you're contorting your query to force the evaluation order.
Why are you complaining that PG follows what you told it to do?

I'm having a hard time figuring out exactly what the query's intent
is.  What does it look like when you express it in the simplest way
possible, with minimum use of subselects?

            regards, tom lane

pgsql-general by date:

Previous
From: "Maksim Likharev"
Date:
Subject: Query plan question
Next
From: "Maksim Likharev"
Date:
Subject: Re: Query plan question