Re: Wrong rows estimations with joins of CTEs slows queries by more than factor 500
vignesh C <vignesh21@gmail.com>
From: vignesh C <vignesh21@gmail.com>
To: Richard Guo <guofenglinux@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Alexander Lakhin <exclusion@gmail.com>,
Jian Guo <gjian@vmware.com>, Tomas Vondra <tomas.vondra@enterprisedb.com>,
Hans Buschmann <buschmann@nidsa.net>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>,
Zhenghua Lyu <zlyu@vmware.com>
Date: 2024-01-29T03:19:53Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Allow examine_simple_variable() to work on INSERT RETURNING Vars.
- 89b69db82adf 17.0 landed
-
Extract column statistics from CTE references, if possible.
- f7816aec23ee 17.0 landed
-
Remove SQL regression tests for GUCs related to NO_SHOW_ALL
- dbe8a1726cfd 15.3 cited
On Mon, 29 Jan 2024 at 08:01, Richard Guo <guofenglinux@gmail.com> wrote: > > > On Sat, Jan 27, 2024 at 10:08 AM vignesh C <vignesh21@gmail.com> wrote: >> >> On Mon, 8 Jan 2024 at 22:21, Tom Lane <tgl@sss.pgh.pa.us> wrote: >> > >> > Richard Guo <guofenglinux@gmail.com> writes: >> > > On Sun, Jan 7, 2024 at 6:41 AM Tom Lane <tgl@sss.pgh.pa.us> wrote: >> > >> Thanks for the report! I guess we need something like the attached. >> > >> > > +1. >> > >> > Pushed, thanks for looking at it. >> >> 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. Regards, Vignesh