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

From Alvaro Herrera
Subject Re: Quadratic planning time for ordered paths over partitioned tables
Date
Msg-id 202501221636.mynlx5r3tba4@alvherre.pgsql
Whole thread Raw
Responses Re: Quadratic planning time for ordered paths over partitioned tables
List pgsql-hackers
Hello,

On 2025-Jan-22, Alexander Kuzmenkov wrote:

> Hi hackers,
> 
> There's currently an unfortunate CPU sink in the planning for
> partitioned tables. It happens both for the declarative partitioning,
> and for the partitioning through inheritance like we use in
> TimescaleDB.
> 
> The gist of it is that there's a linear search of the EM corresponding
> to the given child relation in find_ec_member_matching_pathkeys().

I think this is closely related to the work Yuya Watari has been doing
at
https://postgr.es/m/CAJ2pMkZZHrhgQ5UV0y+STKqx7XVGzENMhL98UbKM-OArvK9dmA@mail.gmail.com
Perhaps you could contribute by reviewing that patch series.

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/
"Los cuentos de hadas no dan al niño su primera idea sobre los monstruos.
Lo que le dan es su primera idea de la posible derrota del monstruo."
                                                   (G. K. Chesterton)



pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: Converting pqsignal to void return
Next
From: Andres Freund
Date:
Subject: Re: Converting pqsignal to void return