Re: RES: RES: Improving select peformance - Mailing list pgsql-performance

From Tom Lane
Subject Re: RES: RES: Improving select peformance
Date
Msg-id 28235.1186107181@sss.pgh.pa.us
Whole thread Raw
In response to RES: RES: Improving select peformance  ("Carlos H. Reimer" <carlos.reimer@opendb.com.br>)
Responses RES: RES: RES: Improving select peformance
List pgsql-performance
"Carlos H. Reimer" <carlos.reimer@opendb.com.br> writes:
> In this case, I believe the best choice to improve the performance of this
> particular SQL statement is adding the 'set join_collapse_limit = 1;' just
> before the join statement, correct?

That's a mighty blunt instrument.  The real problem with your query is
the misestimation of the join sizes --- are you sure the table
statistics are up to date?  Maybe you'd get better estimates with more
statistics (ie, increase the stats target for these tables).

            regards, tom lane

pgsql-performance by date:

Previous
From: "Carlos H. Reimer"
Date:
Subject: RES: RES: Improving select peformance
Next
From: "Sven Clement"
Date:
Subject: Performance problems with large telemetric datasets on 7.4.2