Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ftmTP-0001he-7A for pgsql-general@arkaria.postgresql.org; Sun, 26 Aug 2018 04:16:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ftmTM-0006it-DC for pgsql-general@arkaria.postgresql.org; Sun, 26 Aug 2018 04:16:20 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ftmTK-0006im-Hk for pgsql-general@lists.postgresql.org; Sun, 26 Aug 2018 04:16:20 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ftmTG-0006Wz-GS for pgsql-general@lists.postgresql.org; Sun, 26 Aug 2018 04:16:17 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 77D7F21A1E; Sun, 26 Aug 2018 00:16:13 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Sun, 26 Aug 2018 00:16:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=N5NpsS92l4hOWQj807K1wI6zHk6Kq 6e+wq+jZeho3zs=; b=VQxWXqyUMTxh92mnwjZ64EO+0PwBltAlw5e1Cs6jQ10w5 fHdbi3lIoHuq0X48pPvV7Pp2zzJTWSfRsOUsxSQNsMzhfSPi8bS+Fp7bJw8wm6Hi c++kANPdFqB9GgPmlUyal1y12v1OpR3efuOWtvXmeynz9YUZ2fm7M6OhFhJPd90e /WoLiTEMrqOUVaoHrL9+HUzPgRHGo1LJs7NeG48YpEuYp5uQhu7JNZrKTw16jAig kf/iHZ5yWwNaUWPLhzWoVzSwSqNGgMesZ/6QNQ8IhFuCQLmEfCtwmHJG4j9ITJwp GleL+jDpQL+qK0qNaugn+R31hxoZ6n+syKUBbqSvw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=N5NpsS 92l4hOWQj807K1wI6zHk6Kq6e+wq+jZeho3zs=; b=TdwIuWTf9n/BW3oM3ws9kL bFyl8pj9Xxq5nGOTNVL9zOROr190YWdguo7chuIIP5KKGCHXy2oL8gc/u1aSx2IA Y8g7IjV4JPLKu5H+ouPDTTIHPEnVejxxw/H1fnZI+0qbJP92aLaNSCGFt7e4hL7A 3kM7c4BZAflvuAPs1hjqjLCiQsvHvKA6gtc7yxEilwJcqbfGifOPdgy9YVRf9nmv uTkt5jQ+D4KH3Ld5BS2gEg0LbXcFM9Sog+Bx8QLuUJ4FSK24Xqzcnzuyb+wO1DWn NP4qtKFzTToib7adssSFUnrGbc/J8VKMeYa6cVKVJnJbzvaf32UOwMJvl768lYJQ == X-ME-Proxy: X-ME-Sender: Received: from [192.168.1.3] (unknown [71.212.134.3]) by mail.messagingengine.com (Postfix) with ESMTPA id BFC9210289; Sun, 26 Aug 2018 00:16:12 -0400 (EDT) Subject: Re: Size of the table is growing abnormally in my database. To: Raghavendra Rao J S V , pgsql-general@lists.postgresql.org References: From: Adrian Klaver Message-ID: <7f06d91a-024e-bdcc-023f-1f3eeeea3586@aklaver.com> Date: Sat, 25 Aug 2018 21:16:11 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 08/25/2018 08:36 PM, Raghavendra Rao J S V wrote: > Hi All, > > One of our database size is 50gb. Out of it one of the table has > 149444622 records. Size of that table is 14GB and its indexes size is 16GB. > Total size of the table and its indexes are 30GB. I have perfomred the > below steps on that table. > > reindex table table_name; > > vacuum full verbose analyze on table_name; > > But still the size of the table and its indexes size are not reduced. > Please guid me. How to proceed further. Rough approximation: 14,000,000,000 / 150,000,000 = 93 bytes/record. I am not seeing an issue. If you want to reduce the size of the table remove rows. > > Structure of the table as below. > >        Column           |       Type       | Modifiers | Storage | > Stats target | Description > ---------------------+------------------+-----------+---------+--------------+------------- >  col1| bigint           |           | plain   |              | >  col2 | double precision |           | plain   |              | >  col3| double precision |           | plain   |              | >  col4| double precision |           | plain   |              | >  col5| double precision |           | plain   |              | >  col6date| date             |           | plain   |              | >  tkey | integer          |           | plain   |              | >  cid | integer          |           | plain   |              | >  rtypeid | integer          |           | plain   |              | >  rid | integer          |           | plain   |              | >  ckey | bigint           |           | plain   |              | > Indexes: >     "idx_tab_cid" btree (cid) >     "idx_tab_ckey" btree (ckey) >     "idx_tab_col6date" btree (col6date) >     "idx_tab_rid" btree (rid) >     "idx_tab_rtype_id" btree (rtypid) >     "idx_tab_tkey" btree (tkey) > > > -- > Regards, > Raghavendra Rao J S V > Mobile- 8861161425 -- Adrian Klaver adrian.klaver@aklaver.com