RE: Bad execution plan when joining partitioned tables

From: "Jean-Marc Voillequin (MA)" <Jean-Marc(dot)Voillequin(at)moodys(dot)com>
To: Richard Schmidlechner <richard(dot)schmidlechner(at)elisanet(dot)fi>, "pgsql-sql(at)lists(dot)postgresql(dot)org" <pgsql-sql(at)lists(dot)postgresql(dot)org>
Subject: RE: Bad execution plan when joining partitioned tables
Date: 2023-11-29 16:26:36
Message-ID: MN2PR20MB2735293EB9C9766F38222DAEBE83A@MN2PR20MB2735.namprd20.prod.outlook.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello,

analyze a ;
analyze b ;

May be sufficient, vacuum is not required.

Regards

From: Richard Schmidlechner <richard(dot)schmidlechner(at)elisanet(dot)fi>
Sent: Wednesday, November 29, 2023 4:17 PM
To: pgsql-sql(at)lists(dot)postgresql(dot)org
Subject: Re: Bad execution plan when joining partitioned tables

Hi, After updating db statistics the number of estimated rows has been correct VACUUM ANALYZE a; VACUUM ANALYZE b; ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍
ZjQcmQRYFpfptBannerStart
This email originated from outside of Moody's
Do not click links or open attachments unless you recognize the sender and know the content is safe.
ZjQcmQRYFpfptBannerEnd

Hi,

After updating db statistics the number of estimated rows has been correct

VACUUM ANALYZE a;

VACUUM ANALYZE b;

----------------------------------------------------------------------
Moody's monitors email communications through its networks for regulatory compliance purposes and to protect its customers, employees and business and where allowed to do so by applicable law. The information contained in this e-mail message, and any attachment thereto, is confidential and may not be disclosed without our express permission. If you are not the intended recipient or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that you have received this message in error and that any review, dissemination, distribution or copying of this message, or any attachment thereto, in whole or in part, is strictly prohibited. If you have received this message in error, please immediately notify us by telephone, fax or e-mail and delete the message and all of its attachments. Every effort is made to keep our network free from viruses. You should, however, review this e-mail message, as well as any attachment thereto, for viruses. We take no responsibility and have no liability for any computer virus which may be transferred via this e-mail message.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Bo Guo 2023-12-02 19:03:45 Overcoming Initcap Function limitations?
Previous Message Richard Schmidlechner 2023-11-29 15:16:36 Re: Bad execution plan when joining partitioned tables