Re: Access plan selection logic PG9.2 -> PG14

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: "Ryo Yamaji (Fujitsu)" <yamaji(dot)ryo(at)fujitsu(dot)com>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Access plan selection logic PG9.2 -> PG14
Date: 2023-09-14 14:59:42
Message-ID: 9da2d3e1-708d-ba92-cdec-96f3bddec397@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2023-09-14 15:24:58 Re: Help with PostgreSQL Upgrade
Previous Message David Rowley 2023-09-14 14:42:36 Re: Access plan selection logic PG9.2 -> PG14