public inbox for [email protected]
help / color / mirror / Atom feedFrom: Andrei Lepikhov <[email protected]>
To: James Pang <[email protected]>
To: [email protected]
Subject: Re: partition table optimizer join cost misestimation
Date: Thu, 3 Apr 2025 08:32:44 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAHgTRfdOsgSkHcgB+q-=M-+hb_jyyV1icwTSaCHFbby8C-CUxQ@mail.gmail.com>
References: <CAHgTRfedznOOrDxLhvDCHYhTMDvsbfE4uWCmxBPywcOS-GikXg@mail.gmail.com>
<[email protected]>
<CAHgTRfdOsgSkHcgB+q-=M-+hb_jyyV1icwTSaCHFbby8C-CUxQ@mail.gmail.com>
On 4/3/25 02:46, James Pang wrote:
> Andrei,
> Yes, from explain output, since optimizer already get the
> merge_append cost but not take account into total cost, that make a big
> difference. I shared table DDLs and explain analyze,buffers output , I
> think the data maybe generated by other way to reproduce this issue.
> sorry for not sharing the commercial production data here.
I think it is almost enough to identify the issue. Let me ask you the
following questions:
1. Can you provide min and max values in columns cc.sss_id and aa.mmm_id?
2. How often do you analyze your *parent* tables tablea and tablec?
Remember, if you want to build statistics on a partitioned table (not a
partition), you have to explicitly call
ANALYZE tablea,tablec;
mentioning these tables in the analyze list.
3. May you provide a dump of pg_statistic on attributes cc.sss_id and
aa.mmm_id?
4. Is there a possibility of changing a single code line and rebuilding
your DB instance to check a conjecture?
--
regards, Andrei Lepikhov
view thread (5+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: partition table optimizer join cost misestimation
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox