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 1lf3LN-0005Al-H6 for pgsql-performance@arkaria.postgresql.org; Fri, 07 May 2021 16:28:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lf3LL-0006ww-3t for pgsql-performance@arkaria.postgresql.org; Fri, 07 May 2021 16:28:47 +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 1lf3LK-0006wo-S1 for pgsql-performance@lists.postgresql.org; Fri, 07 May 2021 16:28:46 +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 1lf3LI-0007U7-Jz for pgsql-performance@lists.postgresql.org; Fri, 07 May 2021 16:28:46 +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 147GSgjF041317; Fri, 7 May 2021 12:28:42 -0400 From: Tom Lane To: Justin Pryzby cc: Semen Yefimenko , Vijaykumar Jain , pgsql-performance@lists.postgresql.org Subject: Re: Very slow Query compared to Oracle / SQL - Server In-reply-to: <20210507161551.GT27406@telsasoft.com> References: <20210507161551.GT27406@telsasoft.com> Comments: In-reply-to Justin Pryzby message dated "Fri, 07 May 2021 11:15:51 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <41315.1620404922.1@sss.pgh.pa.us> Date: Fri, 07 May 2021 12:28:42 -0400 Message-ID: <41316.1620404922@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Justin Pryzby writes: > On Fri, May 07, 2021 at 05:57:19PM +0200, Semen Yefimenko wrote: >> For testing purposes I set up a separate postgres 13.2 instance on windows. >> To my surprise, it works perfectly fine. Also indexes, have about 1/4 of >> the size they had on 12.6. > In pg13, indexes are de-duplicated by default. > But I suspect the performance is better because data was reload, and the > smaller indexes are a small, additional benefit. Index bloat is often a consequence of inadequate vacuuming. You might need to dial up autovacuum's aggressiveness to keep their sizes in check. regards, tom lane