Re: Quadratic planning time for ordered paths over partitioned tables - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Quadratic planning time for ordered paths over partitioned tables
Date
Msg-id 3937316.1737566123@sss.pgh.pa.us
Whole thread Raw
In response to Re: Quadratic planning time for ordered paths over partitioned tables  (Alexander Kuzmenkov <akuzmenkov@timescale.com>)
Responses Re: Quadratic planning time for ordered paths over partitioned tables
List pgsql-hackers
Alexander Kuzmenkov <akuzmenkov@timescale.com> writes:
> Yeah, I'm referencing this one in my email, but it's a series of
> patches that does a major refactoring changing thousands of lines. I'm
> not sure when or if it's going to land, do you think applying a quick
> fix first would make sense? It makes trivial changes in one function.

That "quick fix" seems extremely horrid: since there's only one static
cache variable for all ECs, it's going to help only one very specific
call pattern, which could easily get broken by unrelated changes.
Also, maybe my performance instincts are rooted in old hardware, but
I don't trust integer division with a variable divisor to be cheap.
So ISTM this could as easily make things worse as better.  If you
offered something that was less obviously a kluge, maybe we could
use it.

Really I'd think the right place to be fixing this is at a higher
level.  Where are the repetitive find_ec_member_matching_expr calls
coming from?

            regards, tom lane



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Quadratic planning time for ordered paths over partitioned tables
Next
From: Andres Freund
Date:
Subject: Re: Converting pqsignal to void return