Re: RES: RES: Improving select peformance

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: carlos(dot)reimer(at)opendb(dot)com(dot)br
Cc: "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: RES: RES: Improving select peformance
Date: 2007-08-03 02:13:01
Message-ID: 28235.1186107181@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

"Carlos H. Reimer" <carlos(dot)reimer(at)opendb(dot)com(dot)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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Sven Clement 2007-08-03 13:52:38 Performance problems with large telemetric datasets on 7.4.2
Previous Message Carlos H. Reimer 2007-08-03 01:47:25 RES: RES: Improving select peformance