X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 0B297D9026 for ; Mon, 10 Oct 2005 09:19:16 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 05884-05 for ; Mon, 10 Oct 2005 12:19:08 +0000 (GMT) Received: from ucsns.ucs.co.za (ucsns.ucs.co.za [196.23.43.2]) by svr1.postgresql.org (Postfix) with ESMTP id 76E3AD8C85 for ; Mon, 10 Oct 2005 09:19:10 -0300 (ADT) Received: from ucspost.ucs.co.za (mailgw1.ucs.co.za [196.23.43.253]) by ucsns.ucs.co.za (Postfix) with ESMTP id 7C0092BEA0 for ; Mon, 10 Oct 2005 14:18:40 +0200 (SAST) Received: from jhb.ucs.co.za (jhb.ucs.co.za [172.31.1.3]) by ucspost.ucs.co.za (Postfix) with ESMTP id 72DF7D9DA6 for ; Mon, 10 Oct 2005 14:18:40 +0200 (SAST) Received: from svb.ucs.co.za (svb.ucs.co.za [172.31.1.148]) by jhb.ucs.co.za (Postfix) with ESMTP id 4EF48977D8 for ; Mon, 10 Oct 2005 14:18:40 +0200 (SAST) Date: Mon, 10 Oct 2005 14:18:39 +0200 From: Stef To: pgsql-admin Subject: Compression of text columns Message-ID: <20051010141839.742f6301@svb.ucs.co.za> X-Mailer: Sylpheed-Claws 1.9.6cvs1 (GTK+ 2.6.10; i486-pc-linux-gnu) User-Agent: sillypheed-claws (anti-aliased) X-Face: +lU/o'$=Zv9%Xjo]Kq[_{n&Kb`f{YEWH4&Y#M]'6BkD?VoWe#*@S\MWyD'I>s:0v4{#\[J]l*?]t2uaO(j$d*77Ca-UHo.tkl2)0$B3Jxww\o:xor]<:*Yfx9Vceh)9I/'2g\RKhGTxIIsR^ke^`LVeZ9ksb*:$kQeR@ X-Operating-System: sid X-X-X: _-^-_ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.142 required=5 tests=[AWL=0.142] X-Spam-Level: X-Archive-Number: 200510/110 X-Sequence-Number: 19182 I have a table in the databases I work with, that contains two text columns with XML data stored inside them. This table is by far the biggest table in the databases, and the text columns use up the most space. I saw that the default storage type for text columns is "EXTENDED" which, according to the documentation, uses up extra space to make possible substring functioning faster. Suppose that the data in those columns are only really ever _used_ once, but may be needed in future for viewing purposes mostly, and I cannot really change the underlying structure of the table, what can I possibly do to maximally reduce the amount of disk space used by the table on disk. (There are no indexes on these two columns.) I've thought about compression using something like : ztext http://www.mahalito.net/~harley/sw/postgres/ but I have to change the table structure a lot and I've already encountered problems unzipping the data again. The other problem with this solution, is that database dumps almost double in size, because of double compression. Any suggestions much appreciated TIA Stefan