From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Amit Langote <amitlangote09(at)gmail(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: making update/delete of inheritance trees scale better |
Date: | 2021-03-31 06:14:06 |
Message-ID: | 3126956.1617171246@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Amit Langote <amitlangote09(at)gmail(dot)com> writes:
> On Wed, Mar 31, 2021 at 11:56 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> ... I've complained before that apply_scanjoin_target_to_paths
>> is brute-force and needs to be rewritten, but I don't really want to
>> undertake that task right now.
> I remember having *unsuccessfully* tried to make
> apply_scanjoin_target_to_paths() do the targetlist pushdown for the
> traditional inheritance cases as well. I agree that rethinking the
> whole apply_scanjoin_target_to_paths() approach might be a better use
> of our time. It has a looping-over-the-whole-partition-array
> bottleneck for simple lookup queries that I have long wanted to
> propose doing something about.
I was wondering if we could get anywhere by pushing more smarts
down to the level of create_projection_path itself, ie if we see
we're trying to apply a projection to an AppendPath then push it
underneath that automatically. Then maybe some of the hackery
in apply_scanjoin_target_to_paths could go away.
There's already an attempt at that in apply_projection_to_path,
but it's not completely clean so there are callers that can't
use it. Maybe a little more thought about how to do that
in a way that violates no invariants would yield dividends.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Guillaume Lelarge | 2021-03-31 06:14:43 | Re: Extensions not dumped when --schema is used |
Previous Message | Kyotaro Horiguchi | 2021-03-31 06:05:35 | Re: Stronger safeguard for archive recovery not to miss data |