[postgis-devel] Coordinate compression for native PostGIS geometry storage?

Mark Cave-Ayland mark.cave-ayland at siriusit.co.uk
Tue Mar 10 08:48:07 PDT 2009


Martin Davis wrote:

> Thanks, Mark.  Interesting - I hadn't realized that PG already 
> compresses.  I can imagine that access is expensive if decompression 
> needs to be done every time!

Yes, it's actually the default although you can disable it for any given 
column using ALTER TABLE foo ALTER COLUMN bar SET STORAGE <option> if 
you can cope with the space trade-off (I suspect for some applications 
you would see quite a substantial speed-up).

> I've done some further experimentation, and am no longer quite so 
> enthusiastic that binary compression for floating-point coordinates will 
> be enough of a savings to be worth.  Most geometry datasets I've looked 
> at offer at most about 25% redundancy.  This probably isn't enough to 
> bother with the extra code and performance hit.

Okay, well at least we have a record of this in archives in case the 
idea is revisited later.


ATB,

Mark.

-- 
Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
http://www.siriusit.co.uk
t: +44 870 608 0063



More information about the postgis-devel mailing list