Gregory Stark <stark@enterprisedb.com> writes:
> The SearchCatCache here is the one in get_attavgwidth called to estimate the
> relation width.
Hmm, that information is supposed to be cached ... could you provide the
test case?
> The first thing that comes to mind is that we're doing the
> constraint_exclusion code *after* estimating the width of the relations we're
> going to exclude. If we push the constraint exclusion up a few lines the
> planning time goes down the 1.7s.
... and probably breaks a few things; are you sure there are no needed
side effects of the skipped code?
regards, tom lane