From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Ryo Yamaji (Fujitsu) <yamaji.ryo@fujitsu.com>
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Access plan selection logic PG9.2 -> PG14
Date: Thu, 14 Sep 2023 07:59:42 -0700
Message-ID: <9da2d3e1-708d-ba92-cdec-96f3bddec397@aklaver.com> (raw)
In-Reply-To: <TYAPR01MB607360C7295A12C3978632C78AF7A@TYAPR01MB6073.jpnprd01.prod.outlook.com>
References: <TYAPR01MB607360C7295A12C3978632C78AF7A@TYAPR01MB6073.jpnprd01.prod.outlook.com>
On 9/14/23 00:15, Ryo Yamaji (Fujitsu) wrote:
>
> Hi all
>
> I am planning to migrate from PostgreSQL9.2 to PostgreSQL14.7.
> Running the same SQL with the same statistics as previous versions resulted in different access plans.
> I have no knowledge of the PostgreSQL planner and would like to be informed. Please assist.
>
> Behavior:
> I am using an environment in which the statistics have been manually updated using pg_dbms_stats. (*)
Why not just run ANALYZE on the new 14.7 instance?
> In PostgreSQL9.2, the primary key was selected when a SELECT was executed with all columns of the primary key specified as equals in the where clause.
--
Adrian Klaver
adrian.klaver@aklaver.com
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: adrian.klaver@aklaver.com, yamaji.ryo@fujitsu.com
Subject: Re: Access plan selection logic PG9.2 -> PG14
In-Reply-To: <9da2d3e1-708d-ba92-cdec-96f3bddec397@aklaver.com>
References: <TYAPR01MB607360C7295A12C3978632C78AF7A@TYAPR01MB6073.jpnprd01.prod.outlook.com> <9da2d3e1-708d-ba92-cdec-96f3bddec397@aklaver.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox