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 1jWJHn-00066H-BW for pgsql-general@arkaria.postgresql.org; Wed, 06 May 2020 12:36:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jWJHm-0003HN-5Y for pgsql-general@arkaria.postgresql.org; Wed, 06 May 2020 12:36:26 +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 1jWJHl-0003HG-UI for pgsql-general@lists.postgresql.org; Wed, 06 May 2020 12:36:25 +0000 Received: from [87.230.15.127] (helo=lvps87-230-15-127.dedicated.hosteurope.de) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jWJHi-0001rb-6C for pgsql-general@lists.postgresql.org; Wed, 06 May 2020 12:36:24 +0000 Received: from snob.fritz.box (174.54.150.83.ftth.ewwwb.as8758.net [83.150.54.174]) by lvps87-230-15-127.dedicated.hosteurope.de (Postfix) with ESMTPSA id AC1601D6A41 for ; Wed, 6 May 2020 14:36:18 +0200 (CEST) Subject: Re: Abnormal Growth of Index Size - Index Size 3x large than table size. To: pgsql-general@lists.postgresql.org References: From: Christian Ramseyer Message-ID: <2e2f843a-3e27-8606-89b7-56310d7c7aee@networkz.ch> Date: Wed, 6 May 2020 14:36:17 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 87.230.15.127 (failed) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi On 06.05.20 11:48, Ram Pratap Maurya wrote: > We are facing a problem in our PostgreSQL production database related to > abnormal growth of index size. Some of the indexes are having abnormal > growth and index size is larger than table data size. > > One table is having 75 G.B of index though table size is only 25 G.B. On > monthly basis we are performing vacuum to release the used space. > > > I am attaching the screen shot for your reference. Could you please help > us in resolving the same as this is degrading performance drastically. > Under some usage patterns, a periodic REINDEX might be advisible. See for more details, it might free up a lot of space for you. If it doesn't, you'll need to dive deeper into what this indexes actually are, if they are really used etc. But in cases of abnormal growth that gets worse and worse over time, the above is the first thing to try in my experience. Cheers Christian -- Christian Ramseyer, netnea ag Network Management. Security. OpenSource. https://www.netnea.com