Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lZxxW-0005Us-DN for pgsql-general@arkaria.postgresql.org; Fri, 23 Apr 2021 15:43:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lZxxV-0004Gu-At for pgsql-general@arkaria.postgresql.org; Fri, 23 Apr 2021 15:43:09 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lZxxV-0004Gn-3b for pgsql-general@lists.postgresql.org; Fri, 23 Apr 2021 15:43:09 +0000 Received: from tamriel.snowman.net ([70.109.60.50]) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lZxxR-0008Lo-KU for pgsql-general@lists.postgresql.org; Fri, 23 Apr 2021 15:43:08 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 72E335F799; Fri, 23 Apr 2021 11:43:04 -0400 (EDT) Date: Fri, 23 Apr 2021 11:43:04 -0400 From: Stephen Frost To: Luca Ferrari Cc: pgsql-general Subject: Re: enable_seqscan to off -> initial cost 10000000000 Message-ID: <20210423154304.GD20766@tamriel.snowman.net> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="zJz1jI/q6j6svOgu" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --zJz1jI/q6j6svOgu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --zJz1jI/q6j6svOgu Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJggusIAAoJEO1sijiDR2RVtQcQALZjvz7G2hHH/qT8iCIQ5p/O SQd40Ue93GKPqzlRqtSzKGeZt0CeOmLTehFvVL0hAlUBLgq9J2HX4bLuIW/3eitE ef7Fw5/8q3VzMW5gKe/hEY+2aY2B1LgyfmUUsHDuGljHWde5H4xcMRKCRdrAJZKH 6KYNaWoa6I3ob1W9hOIPYGWVGDoAd3Pec0pyErUeFDg3wwbLHJCzD7tf8VpOB1ZI 4uyif+UOK5PGKqf2/XvAlc9B+3VN3QacQNJiNqzpHCy1B+54gDXWfhr2WBBZw6zF ee6Ex4Prb2qpzLYmxF8Eqa0wBqLF5PURBS1xFZXTNwE99bT6OaufBg+dYUko9fi8 wpmjz2NWC2WYKYXADb5sV0axJtyqOA8Z7s6KMQhcGr08KOiYTmj2oGqcH9sOt90f S96ICz3+Jdwu4RrvX/X9+Lq5PpNLILAZDEdgCMDtWWP7kmbcvq9GJoePg5L+mlf6 tdFI467BJWa810SrqlfsM+IKXVW/WRLHVaw2D/0IVQ9y9E7jo2Vwoot37G95GXkk Lrcj2m6G8z3Xtm4uWastEZq6F92KlCBCWEEqYvLinI2euQJfrA3ZZ8+o5+heZnTA +ELt+aRRpe7Txax2Fj4C4JcFgsMpg2L8rjOB7kqk8V/ybGoFmcaFFLnKSARHcQSH 2T7QoVIWw7afvMKiHwvT =4DN4 -----END PGP SIGNATURE----- --zJz1jI/q6j6svOgu--