Re: Optimizer : query rewrite and execution plan ? - Mailing list pgsql-performance

From Tom Lane
Subject Re: Optimizer : query rewrite and execution plan ?
Date
Msg-id 2685.1202748282@sss.pgh.pa.us
Whole thread Raw
In response to Re: Optimizer : query rewrite and execution plan ?  (Simon Riggs <simon@2ndquadrant.com>)
List pgsql-performance
Simon Riggs <simon@2ndquadrant.com> writes:
> Say if cost of best plan >= N then recheck query for strangeness. If
> anything found, re-plan query.

Whatever makes you think that would be useful?

The usual result of undetected duplicate WHERE clauses is an
*underestimate* of runtime, not an overestimate (because it thinks
too few tuples will be selected).

            regards, tom lane

pgsql-performance by date:

Previous
From: "Linux Guru"
Date:
Subject: Update with Subquery Performance
Next
From: Tom Lane
Date:
Subject: Re: Update with Subquery Performance