Re: Quadratic planning time for ordered paths over partitioned tables

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Alexander Kuzmenkov <akuzmenkov(at)timescale(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Quadratic planning time for ordered paths over partitioned tables
Date: 2025-01-22 16:36:19
Message-ID: 202501221636.mynlx5r3tba4@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2025-01-22 16:50:30 Re: Converting pqsignal to void return
Previous Message Nathan Bossart 2025-01-22 16:22:45 Re: Converting pqsignal to void return