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 1ltF94-00056X-SO for pgsql-bugs@arkaria.postgresql.org; Tue, 15 Jun 2021 19:54:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ltF92-0004RZ-VW for pgsql-bugs@arkaria.postgresql.org; Tue, 15 Jun 2021 19:54:44 +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 1ltF92-0004RR-Os for pgsql-bugs@lists.postgresql.org; Tue, 15 Jun 2021 19:54:44 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ltF90-0006xm-Lx for pgsql-bugs@lists.postgresql.org; Tue, 15 Jun 2021 19:54:43 +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 15FJsZUG439508; Tue, 15 Jun 2021 15:54:35 -0400 From: Tom Lane To: Pavel Stehule cc: Ram Pratap Maurya , PostgreSQL mailing lists Subject: Re: BUG #17059: postgresql 13 version problem related to query. In-reply-to: References: <17059-c96d70e84d7bb4ce@postgresql.org> Comments: In-reply-to Pavel Stehule message dated "Tue, 15 Jun 2021 21:42:05 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <439506.1623786875.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Tue, 15 Jun 2021 15:54:35 -0400 Message-ID: <439507.1623786875@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Pavel Stehule writes: > Ășt 15. 6. 2021 v 21:36 odesĂ­latel Ram Pratap Maurya < > ram.maurya@lavainternational.in> napsal: >> Postgresql-12 : >> -> Index Scan using retailer_code_12390127_idx >> on tretailer_mst retailerlist (cost=0.42..5468.67 rows=146923 width=25) >> (actual time=0.018..180.502 rows=144211 loops=1) >> >> Postgresql-13 >> -> Index Scan using >> retailer_code_12390127_idx on tretailer_mst retailerlist (cost=0.38..0.59 >> rows=1 width=684) (actual time=0.028..928.347 rows=221068 loops=1) There seem to be rather serious discrepancies between rowcount estimates and reality on the v13 installation. Maybe an ANALYZE would help. I'm also wondering why auto-analyze hasn't come along and improved the situation. regards, tom lane