Re: Different execution plan between PostgreSQL 8.4 and 12.11

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: gzh <gzhcoder(at)126(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Different execution plan between PostgreSQL 8.4 and 12.11
Date: 2022-10-09 16:02:09
Message-ID: 3810464.1665331329@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

gzh <gzhcoder(at)126(dot)com> writes:
> I run following sql in PostgreSQL 8.4 and PostgreSQL 12.11, it returns different execution plan.

Have you done an ANALYZE in the new database? The rowcount estimates
seem a lot different, leading me to guess that the newer installation
doesn't have good statistics yet.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mladen Gogala 2022-10-09 16:05:17 Re: Different execution plan between PostgreSQL 8.4 and 12.11
Previous Message Guillaume Lelarge 2022-10-09 12:45:37 Re: recovery.conf and archive files