Re: Wrong rows estimations with joins of CTEs slows queries by more than factor 500

From: Richard Guo <guofenglinux(at)gmail(dot)com>
To: vignesh C <vignesh21(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alexander Lakhin <exclusion(at)gmail(dot)com>, Jian Guo <gjian(at)vmware(dot)com>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, Hans Buschmann <buschmann(at)nidsa(dot)net>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Zhenghua Lyu <zlyu(at)vmware(dot)com>
Subject: Re: Wrong rows estimations with joins of CTEs slows queries by more than factor 500
Date: 2024-01-29 03:40:00
Message-ID: CAMbWs4_Ea9BkajW-Yo91o-Xmmy=3uUpYYQSH0mCGDYZ3kArzrQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jan 29, 2024 at 11:20 AM vignesh C <vignesh21(at)gmail(dot)com> wrote:

> On Mon, 29 Jan 2024 at 08:01, Richard Guo <guofenglinux(at)gmail(dot)com> wrote:
> > On Sat, Jan 27, 2024 at 10:08 AM vignesh C <vignesh21(at)gmail(dot)com> wrote:
> >> I have changed the status of the commitfest entry to "Committed" as I
> >> noticed the patch has already been committed.
> >
> > Well, the situation seems a little complex here. At first, this thread
> > was dedicated to discussing the 'Examine-simple-variable-for-Var-in-CTE'
> > patch, which has already been pushed in [1]. Subsequently, I proposed
> > another patch 'Propagate-pathkeys-from-CTEs-up-to-the-outer-query' in
> > [2], which is currently under review and is what the commitfest entry
> > for. Later on, within the same thread, another patch was posted as a
> > fix to the first patch and was subsequently pushed in [3]. I believe
> > this sequence of events might have led to confusion.
> >
> > What is the usual practice in such situations? I guess I'd better to
> > fork a new thread to discuss my proposed patch which is about the
> > 'Propagate-pathkeys-from-CTEs-up-to-the-outer-query'.
>
> Sorry I missed to notice that there was one pending patch yet to be
> committed, I feel you can continue discussing here itself just to
> avoid losing any historical information about the issue and the
> continuation of the discussion. You can add a new commitfest entry for
> this.

It seems to me that a fresh new thread is a better option. I have just
started a new thread in [1], and have tried to migrate the necessary
context over there. I have also updated the commitfest entry
accordingly.

[1]
https://www.postgresql.org/message-id/flat/CAMbWs49xYd3f8CrE8-WW3--dV1zH_sDSDn-vs2DzHj81Wcnsew%40mail.gmail.com

Thanks
Richard

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2024-01-29 03:47:02 Re: More new SQL/JSON item methods
Previous Message vignesh C 2024-01-29 03:37:50 Commitfest 2024-01 fourth week update