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 1pcTb8-0004Nq-K8 for pgsql-general@arkaria.postgresql.org; Wed, 15 Mar 2023 16:03:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pcTb7-0002yR-AE for pgsql-general@arkaria.postgresql.org; Wed, 15 Mar 2023 16:03:29 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcTb6-0002yH-Vm for pgsql-general@lists.postgresql.org; Wed, 15 Mar 2023 16:03:28 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcTb4-00041X-Ei for pgsql-general@postgresql.org; Wed, 15 Mar 2023 16:03:28 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 32FG3MQo3337980; Wed, 15 Mar 2023 12:03:22 -0400 From: Tom Lane To: Arthur Ramsey cc: pgsql-general@postgresql.org Subject: Re: Table scan on 15.2 In-reply-to: References: Comments: In-reply-to Arthur Ramsey message dated "Wed, 15 Mar 2023 10:17:37 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3337978.1678896202.1@sss.pgh.pa.us> Date: Wed, 15 Mar 2023 12:03:22 -0400 Message-ID: <3337979.1678896202@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Arthur Ramsey writes: > I've upgraded from 12.11 to 15.2 and I'm seeing this query now use a > sequential scan which is taking 500ms instead of < 2ms. If I disable > sequential scans then it performs as well as 12.11. What does the EXPLAIN look like with seqscans disabled? regards, tom lane