Re: Different execution plan between PostgreSQL 8.4 and 12.11

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Josef Šimánek <josef(dot)simanek(at)gmail(dot)com>
Cc: gzh <gzhcoder(at)126(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Different execution plan between PostgreSQL 8.4 and 12.11
Date: 2022-10-11 09:59:45
Message-ID: CAApHDvrkww0YmzOp2qXetNJyVp+LizfLpsXnqMGiWKJVLc8zqw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 11 Oct 2022 at 22:52, Josef Šimánek <josef(dot)simanek(at)gmail(dot)com> wrote:
> This can make some queries fail since there will be no way to gather
> data without seqscan.

Disabling enable_seqscan only adds a const penalty to Seq Scans. It
does not outright disallow them altogether.

Having said that, having Paths with the disabled high cost penalty can
cause other issues like the planner thinking two Paths are "fuzzily"
similar enough in costs and rejecting better Paths when in fact the
better Path is really quite a bit better when you subtract the
disabling cost penalty.

David

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David Rowley 2022-10-11 10:53:36 Re: Re: Different execution plan between PostgreSQL 8.4 and 12.11
Previous Message Josef Šimánek 2022-10-11 09:52:34 Re: Different execution plan between PostgreSQL 8.4 and 12.11