Re: PATCH: generate fractional cheapest paths in generate_orderedappend_path

2022-03-21 Thread Tomas Vondra
On 3/22/22 01:18, Andres Freund wrote: > Hi, > > On 2022-01-14 01:39:30 +0100, Tomas Vondra wrote: >> Are you interested / willing to do some of this work? > > This patch hasn't moved in the last two months. I think it may be time to > mark it as returned with feedback for now? > > It's also

Re: PATCH: generate fractional cheapest paths in generate_orderedappend_path

2022-03-21 Thread Andres Freund
Hi, On 2022-01-14 01:39:30 +0100, Tomas Vondra wrote: > Are you interested / willing to do some of this work? This patch hasn't moved in the last two months. I think it may be time to mark it as returned with feedback for now? It's also failing tests, and has done so for months:

Re: PATCH: generate fractional cheapest paths in generate_orderedappend_path

2022-01-13 Thread Tomas Vondra
On 1/13/22 21:12, Arne Roland wrote: >  Hi! > >> From: Tomas Vondra >> Subject: Re: PATCH: generate fractional cheapest paths in > generate_orderedappend_path >>   >> test-# SELECT * FROM fract_t x LEFT JOIN fract_t y USING (id1, id2) >

Re: PATCH: generate fractional cheapest paths in generate_orderedappend_path

2022-01-13 Thread Arne Roland
Hi! > From: Tomas Vondra > Subject: Re: PATCH: generate fractional cheapest paths in > generate_orderedappend_path > > test-# SELECT * FROM fract_t x LEFT JOIN fract_t y USING (id1, id2) > ORDER BY id1 ASC, id2 ASC LIMIT 10; >

Re: PATCH: generate fractional cheapest paths in generate_orderedappend_path

2022-01-13 Thread Tomas Vondra
FWIW this is now marked as committed. I've created a separate entry in the next CF for the incremental sort part. https://commitfest.postgresql.org/37/3513/ regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company

Re: PATCH: generate fractional cheapest paths in generate_orderedappend_path

2022-01-12 Thread Tomas Vondra
Pushed, after clarifying the comments a bit. I also looked into what would it take to consider incremental paths, and in principle it doesn't seem all that complicated. The attached PoC patch extends get_cheapest_fractional_path_for_pathkeys() to optionally build incremental sort on paths if

Re: PATCH: generate fractional cheapest paths in generate_orderedappend_path

2021-12-10 Thread Tomas Vondra
On 12/10/21 00:51, Arne Roland wrote: Hi, thanks for the reply! From: Tomas Vondra Sent: Thursday, December 2, 2021 20:58 Subject: Re: PATCH: generate fractional cheapest paths in generate_orderedappend_path > [...] > Well, I mentioned three open questions in my first message,

Re: PATCH: generate fractional cheapest paths in generate_orderedappend_path

2021-12-09 Thread Arne Roland
Hi, thanks for the reply! From: Tomas Vondra Sent: Thursday, December 2, 2021 20:58 Subject: Re: PATCH: generate fractional cheapest paths in generate_orderedappend_path > [...] > Well, I mentioned three open questions in my first message, and I don't > think we've really addressed

Re: PATCH: generate fractional cheapest paths in generate_orderedappend_path

2021-12-02 Thread Tomas Vondra
Hi, On 12/2/21 15:58, Arne Roland wrote: Afaiac we should add a simple testcase here, like I suggested in 477344d5f17c4a8e95d3a5bb6642718a . Apart from that I am not sure there is work to be done here.

Re: PATCH: generate fractional cheapest paths in generate_orderedappend_path

2021-12-02 Thread Arne Roland
Arne From: Arne Roland Sent: Saturday, June 26, 2021 5:50:49 PM To: Tomas Vondra Cc: pgsql-hackers Subject: Re: PATCH: generate fractional cheapest paths in generate_orderedappend_path Hi Tomas, I don't think there is much work left to do here. Did you have a look at the test cas

Re: PATCH: generate fractional cheapest paths in generate_orderedappend_path

2021-06-26 Thread Arne Roland
Subject: Re: PATCH: generate fractional cheapest paths in generate_orderedappend_path > I think it should. We have a ParallelAppend node after all. > I'm not really familiar with the way > get_cheapest_fractional_path_for_pathkeys is used, but a quick search > suggests to > me, that bu

Re: PATCH: generate fractional cheapest paths in generate_orderedappend_path

2021-06-03 Thread Arne Roland
Hi, thanks for the quick reply! From: Tomas Vondra Sent: Thursday, June 3, 2021 20:11 To: Arne Roland; pgsql-hackers Subject: Re: PATCH: generate fractional cheapest paths in generate_orderedappend_path > I haven't tested the parallel case, but I think we should sort out

Re: PATCH: generate fractional cheapest paths in generate_orderedappend_path

2021-06-03 Thread Tomas Vondra
On 6/3/21 10:52 PM, Zhihong Yu wrote: > ... > > Sent a bit too soon. > > The above function still exists. > But startup_new_fractional was nowhere to be found. Actually, there are two comments /* XXX maybe we should have startup_new_fractional? */ in the patch I posted - I completely

Re: PATCH: generate fractional cheapest paths in generate_orderedappend_path

2021-06-03 Thread Zhihong Yu
On Thu, Jun 3, 2021 at 1:50 PM Zhihong Yu wrote: > > > On Thu, Jun 3, 2021 at 11:12 AM Tomas Vondra < > tomas.von...@enterprisedb.com> wrote: > >> Hi, >> >> On 6/3/21 7:17 PM, Arne Roland wrote: >> > Hi, >> > >> > >> > I haven't tested the parallel case, but I think we should sort out (3) >> >

Re: PATCH: generate fractional cheapest paths in generate_orderedappend_path

2021-06-03 Thread Zhihong Yu
On Thu, Jun 3, 2021 at 11:12 AM Tomas Vondra wrote: > Hi, > > On 6/3/21 7:17 PM, Arne Roland wrote: > > Hi, > > > > > > I haven't tested the parallel case, but I think we should sort out (3) > > get_cheapest_fractional_path_for_pathkeys as mentioned above. > > > > Not sure what you refer to by

Re: PATCH: generate fractional cheapest paths in generate_orderedappend_path

2021-06-03 Thread Tomas Vondra
Hi, On 6/3/21 7:17 PM, Arne Roland wrote: > Hi, > > > I haven't tested the parallel case, but I think we should sort out (3) > get_cheapest_fractional_path_for_pathkeys as mentioned above. > Not sure what you refer to by "above" - it's probably better to reply in-line to existing message,

Re: PATCH: generate fractional cheapest paths in generate_orderedappend_path

2021-06-03 Thread Arne Roland
Hi, I haven't tested the parallel case, but I think we should sort out (3) get_cheapest_fractional_path_for_pathkeys as mentioned above. I am lost about the comment regarding startup_new_fractional. Could you elaborate what you mean by that? Apart from that, I'd argue for a small test

Re: PATCH: generate fractional cheapest paths in generate_orderedappend_path

2021-04-26 Thread Arne Roland
2021 1:52:19 AM To: pgsql-hackers Subject: PATCH: generate fractional cheapest paths in generate_orderedappend_path Hi, This patch is a WIP fix for the issue described in [1], where the planner picks a more expensive plan with partition-wise joins enabled, and disabling this option produces a

PATCH: generate fractional cheapest paths in generate_orderedappend_path

2021-04-16 Thread Tomas Vondra
Hi, This patch is a WIP fix for the issue described in [1], where the planner picks a more expensive plan with partition-wise joins enabled, and disabling this option produces a cheaper plan. That's a bit strange because with the option disabled we consider *fewer* plans, so we should not be able