enable_seqscan to off -> initial cost 10000000000

From: Luca Ferrari <fluca1978(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: enable_seqscan to off -> initial cost 10000000000
Date: 2021-04-23 15:39:16
Message-ID: CAKoxK+6LA_w3u3hFeofw=SP6LSR0i6_Zh==GLWJ3y_nEhsRX5A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,
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?

testdb=# create table tseq( pk serial );
CREATE TABLE
testdb=# explain select * from tseq;
QUERY PLAN
--------------------------------------------------------
Seq Scan on tseq (cost=0.00..35.50 rows=2550 width=4)
(1 row)

testdb=# set enable_seqscan to off;
SET
testdb=# explain select * from tseq;
QUERY PLAN
---------------------------------------------------------------------------
Seq Scan on tseq (cost=10000000000.00..10000000035.50 rows=2550 width=4)
(1 row)

testdb=# show server_version;
server_version
----------------
12.5

Thanks,
Luca

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stephen Frost 2021-04-23 15:43:04 Re: enable_seqscan to off -> initial cost 10000000000
Previous Message Matthias Apitz 2021-04-23 09:32:02 Re: client waits for end of update operation and server proc is idle