Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hFxCq-0006Qm-BC for pgsql-general@arkaria.postgresql.org; Mon, 15 Apr 2019 08:43:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hFxCo-0002si-4G for pgsql-general@arkaria.postgresql.org; Mon, 15 Apr 2019 08:43:10 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hFxCn-0002qU-NV for pgsql-general@lists.postgresql.org; Mon, 15 Apr 2019 08:43:09 +0000 Received: from mta7.iomartmail.com ([62.128.193.157]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hFxCk-0006gT-Ae for pgsql-general@lists.postgresql.org; Mon, 15 Apr 2019 08:43:08 +0000 Received: from vs3.iomartmail.com (vs3.iomartmail.com [10.12.10.124]) by mta7.iomartmail.com (8.14.4/8.14.4) with ESMTP id x3F8h2JJ031928 for ; Mon, 15 Apr 2019 09:43:02 +0100 Received: from vs3.iomartmail.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6F30A2203A for ; Mon, 15 Apr 2019 09:43:02 +0100 (BST) Received: from asmtp3.iomartmail.com (unknown [10.12.10.224]) by vs3.iomartmail.com (Postfix) with ESMTPS id 6425922032 for ; Mon, 15 Apr 2019 09:43:02 +0100 (BST) Received: from RayCLaptopHP (my83-216-65-96.cust.ukbroadband.com [83.216.65.96] (may be forged)) (authenticated bits=0) by asmtp3.iomartmail.com (8.14.4/8.14.4) with ESMTP id x3F8h0ZJ026777 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Mon, 15 Apr 2019 09:43:01 +0100 From: "Ray Cheung" To: Subject: Storage Inefficiency In PostgreSQL Date: Mon, 15 Apr 2019 09:42:06 +0100 Message-ID: <003401d4f367$1c613260$55239720$@silverpowersystems.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AdTzZP2f3QpcQbL3S8qwEH+71NIJyg== Content-Language: en-gb X-Antivirus: Avast (VPS 190414-4, 14/04/2019), Outbound message X-Antivirus-Status: Clean X-Originating-IP: 83.216.65.96 X-Thinkmail-Auth: ray.cheung@silverpowersystems.com X-TM-AS-GCONF: 00 X-TM-AS-Product-Ver: IMSVA-9.0.0.1623-8.2.0.1013-24552.006 X-TM-AS-Result: No--5.338-10.0-31-10 X-imss-scan-details: No--5.338-10.0-31-10 X-TMASE-Version: IMSVA-9.0.0.1623-8.2.1013-24552.006 X-TMASE-Result: 10--5.338300-10.000000 X-TMASE-MatchedRID: /j+7VyTn02LhNqBHBwFAs7MjW/sniEQK7yWPaQc4INRaW2Ktn+I8/oFT GFQTZiyAzSHz1iZSpkHJqfqB8uEVjoG6l2RoR45uwMyV95EWVHzYP/ttQgmUXXy/Hx1AgJrrhG0 ycgo3FvByC511Aa/rrmtObzNdGL4Q1GwaHEr6jXexlpnlQFCyhwUYMvghJoGL7ar5u9c5rwIoJF D1mE1tRuLzNWBegCW2XC3N7C7YzrfQqQhSw0x2VN0H8LFZNFG7bkV4e2xSge5rl+L51m9ojPekQ Gek1Xq4vu17U09GARSzDpJ8STAv60uFvzEYSdV+ X-TMASE-SNAP-Result: 1.821001.0001-0-1-12:0,22:0,33:0,34:0-0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi , We are currently contemplating switching from MySQL to PostgreSQL, the main attraction being the use of the TimescaleDB extension. Having done much of the ground investigation there is one area of significant concern - the storage requirement of PostgreSQL. Put simply, comparing like for like for a set of tables, PostgreSQL consumes far more storage space than MySQL: - MySQL (5.6): 156 MB - PostgreSQL (11.2): 246 MB - PostgreSQL + TimescaleDB (partitioned/chunked data): 324 MB I've also submitted this in stackoverflow: https://stackoverflow.com/questions/55655272/how-to-reduce-postgresql-databa se-size. I can rearrange the table/column-alignment to save 6 bytes per row of the main table, with a saving of a few mega-bytes. Not enough to make any real difference. Does anyone know: - Why PostgreSQL is so storage inefficient in comparison? - What existing methods can be used to reduce the storage consumption (I've already tried realignment and vacuum full)? - Are there any plans to address this storage consumption inefficiency (in comparison to MySQL) problem? Many thanks, sps-ray --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus