Fix a performance regression in 8.2: optimization of MIN/MAX into indexscans

Tom Lane <tgl@sss.pgh.pa.us>

Commit: a95abdf8564e36b7c9de62423fcbe039fcc20efa
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2007-02-06T06:50:33Z
Releases: 8.2.3
Fix a performance regression in 8.2: optimization of MIN/MAX into indexscans
had stopped working for tables buried inside views or sub-selects.  This is
because I had gotten rid of the simplify_jointree() preprocessing step, and
optimize_minmax_aggregates() wasn't smart enough to deal with a non-canonical
FromExpr.  Per gripe from Bill Howe.

Files

PathChange+/−
src/backend/optimizer/plan/planagg.c modified +13 −7