Re: Huge query stalls at PARSE/BIND stage (1) - Mailing list pgsql-bugs

From Matt
Subject Re: Huge query stalls at PARSE/BIND stage (1)
Date
Msg-id 1132563660.18269.12.camel@localhost
Whole thread Raw
In response to Re: Huge query stalls at PARSE/BIND stage (1)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
> Thanks for the test case.  The problem turns out to be sloppy coding in
> exprTypmod(): it recurses twice on the first argument of a COALESCE,
> making for exponential growth in the time needed to process a deep nest
> of COALESCE expressions ... which is exactly what your deeply nested
> FULL JOINs produce for the join USING variables.  The patch attached
> fixes it for 8.0.* --- I've committed equivalent fixes as far back as
> 7.4, where the problem originated.
>
> Moral: sometimes an apparently trivial inefficiency isn't so trivial.


Interesting. Thanks Tom. You've saved me an unpleasant workaround.
Glad I could contribute *something*!

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: postgresql8.1 crushes on some inserts/updates in KOI8 encoding
Next
From: "Chris Storah"
Date:
Subject: BUG #2059: PGConnect fails when used in a thread