From: gzh <gzhcoder@126.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-general@lists.postgresql.org
Subject: Re:Re: Different execution plan between PostgreSQL 8.4 and 12.11
Date: Mon, 10 Oct 2022 10:32:56 +0800 (CST)
Message-ID: <3bb0d13f.1d81.183bfbcf7e4.Coremail.gzhcoder@126.com> (raw)
In-Reply-To: <3810464.1665331329@sss.pgh.pa.us>
References: <23fe7e4b.5866.183bc03584f.Coremail.gzhcoder@126.com>
<3810464.1665331329@sss.pgh.pa.us>
Hi Tom,
Thank you for your prompt response.
I've run analyze(not vacuum analyze), but it doesn't seem to work.
Is there any other way to optimize the database?
At 2022-10-10 00:02:09, "Tom Lane" <tgl@sss.pgh.pa.us> wrote:
>gzh <gzhcoder@126.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
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: gzhcoder@126.com, tgl@sss.pgh.pa.us
Subject: Re: Different execution plan between PostgreSQL 8.4 and 12.11
In-Reply-To: <3bb0d13f.1d81.183bfbcf7e4.Coremail.gzhcoder@126.com>
References: <23fe7e4b.5866.183bc03584f.Coremail.gzhcoder@126.com> <3810464.1665331329@sss.pgh.pa.us> <3bb0d13f.1d81.183bfbcf7e4.Coremail.gzhcoder@126.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