Re: 27 second plan times - Mailing list pgsql-hackers

From Tom Lane
Subject Re: 27 second plan times
Date
Msg-id 22785.1177105635@sss.pgh.pa.us
Whole thread Raw
In response to 27 second plan times  (Gregory Stark <stark@enterprisedb.com>)
Responses Re: 27 second plan times  (Gregory Stark <stark@enterprisedb.com>)
Re: 27 second plan times  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: "Nicolas Barbier"
Date:
Subject: Re: Eliminating unnecessary left joins
Next
From: Gregory Stark
Date:
Subject: Re: 27 second plan times