From: Stephen Frost <sfrost@snowman.net>
To: Luca Ferrari <fluca1978@gmail.com>
Cc: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: enable_seqscan to off -> initial cost 10000000000
Date: Fri, 23 Apr 2021 11:43:04 -0400
Message-ID: <20210423154304.GD20766@tamriel.snowman.net> (raw)
In-Reply-To: <CAKoxK+6LA_w3u3hFeofw=SP6LSR0i6_Zh==GLWJ3y_nEhsRX5A@mail.gmail.com>
References: <CAKoxK+6LA_w3u3hFeofw=SP6LSR0i6_Zh==GLWJ3y_nEhsRX5A@mail.gmail.com>
Greetings,
* Luca Ferrari (fluca1978@gmail.com) wrote:
> this could be trivial, but I would like an explaination: if I turn off
> sequential scans on a table without indexes, the same access plan is
> increased by a 10000000000 factor. I suspect this is a warning for me
> to remind that something is misconfigured, or is there anothe reason?
No- that's what setting it to "off" means, in actuality we just make it
really expensive to encourage the planner to try and find another plan.
That's not always possible to do though, hence the resulting plan with a
really high cost.
The enable_* options are really just for poking around and not something
you'd want to set.
Thanks,
Stephen
Attachments:
signature.asc (application/pgp-signature, 818B) download
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: sfrost@snowman.net, fluca1978@gmail.com
Subject: Re: enable_seqscan to off -> initial cost 10000000000
In-Reply-To: <20210423154304.GD20766@tamriel.snowman.net>
References: <CAKoxK+6LA_w3u3hFeofw=SP6LSR0i6_Zh==GLWJ3y_nEhsRX5A@mail.gmail.com> <20210423154304.GD20766@tamriel.snowman.net>
* 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