Re: make add_paths_to_append_rel aware of startup cost

From: Andy Fan <zhihui(dot)fan1213(at)gmail(dot)com>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Zhang Mingli <zmlpostgres(at)gmail(dot)com>
Subject: Re: make add_paths_to_append_rel aware of startup cost
Date: 2023-10-05 01:11:35
Message-ID: CAKU4AWo0F3vMZp0WMuN9-WtZpA0CCmd+gKqdaix_TqgXYkSwWg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Oct 4, 2023 at 8:41 AM David Rowley <dgrowleyml(at)gmail(dot)com> wrote:

> On Sun, 1 Oct 2023 at 21:26, Andy Fan <zhihui(dot)fan1213(at)gmail(dot)com> wrote:
> >> But overall, I'm more inclined to just go with the more simple "add a
> >> cheap unordered startup append path if considering cheap startup
> >> plans" version. I see your latest patch does both. So, I'd suggest two
> >> patches as I do see the merit in keeping this simple and cheap. If we
> >> can get the first part in and you still find cases where you're not
> >> getting the most appropriate startup plan based on the tuple fraction,
> >> then we can reconsider what extra complexity we should endure in the
> >> code based on the example query where we've demonstrated the planner
> >> is not choosing the best startup path appropriate to the given tuple
> >> fraction.
> >
> > I think this is a fair point, I agree that your first part is good
> enough to be
> > committed first. Actually I tried a lot to make a test case which can
> prove
> > the value of cheapest fractional cost but no gain so far:(
>
> I've attached a patch with the same code as the previous patch but
> this time including a regression test.
>
> I see no reason to not commit this so if anyone feels differently
> please let me know.
>
> David
>

Patch LGTM.

--
Best Regards
Andy Fan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message James Coleman 2023-10-05 01:12:33 Re: [DOCS] HOT - correct claim about indexes not referencing old line pointers
Previous Message Isaac Morland 2023-10-05 01:02:21 Re: Pre-proposal: unicode normalized text