Skip site navigation (1) Skip section navigation (2)

Compression of text columns

From: Stef <svb(at)ucs(dot)co(dot)za>
To: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Compression of text columns
Date: 2005-10-10 12:18:39
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
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 :

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



pgsql-admin by date

Next:From: Luca FerrariDate: 2005-10-10 12:24:46
Subject: Re: character problem
Previous:From: Hannes DorbathDate: 2005-10-10 11:52:22
Subject: Re: Update - pg_dumpall money problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group