[postgis-users] Storage efficiency of point and line data
Michael Graff
explorer at flame.org
Mon Nov 4 13:12:24 PST 2002
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
It seems there is a large overhead to storing point and line data in
a geometry type. mem_size() returns 172 bytes for a two-point line,
and goes up by 24 bytes per additional point. Returning the data in
binary form seems to show only 6 bytes per point, so perhaps this
is twice the actual storage.
I thought about storing only the bounding boxes in a table, and
storing the actual shape in a flat binary file (probably storing
each lat/long pair as a pair of 32-bit signed integers) but it
turns out that wouldn't be a huge win, as most of the data I have
consists of 2 points:
cnt | points | size
- ----------+--------+-------
23333966 | 2 | 172
6789516 | 3 | 196
3712433 | 4 | 220
2438493 | 5 | 244
1749440 | 6 | 268
1346119 | 7 | 292
976198 | 8 | 316
806865 | 9 | 340
658199 | 10 | 364
Is the storage format fairly efficient, and I'm simply storing a whole
lot of data?
- --Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (NetBSD)
Comment: See http://www.flame.org/~explorer/pgp for my keys
iD8DBQE9xuK4l6Nz7kJWYWYRAgVsAJ98fZA2rKO6c+0g4tXJbZVhtFOkcwCePyo9
U8tPUmiAdyAIcc0F6pvRF5M=
=bOOF
-----END PGP SIGNATURE-----
More information about the postgis-users
mailing list