[postgis-commits] svn - r3300 - trunk/doc

postgis-commits at postgis.refractions.net postgis-commits at postgis.refractions.net
Mon Nov 17 09:30:54 PST 2008


Author: robe
Date: 2008-11-17 09:30:53 -0800 (Mon, 17 Nov 2008)
New Revision: 3300

Modified:
   trunk/doc/reference_new.xml
Log:
amend ST_Mem_Size

Modified: trunk/doc/reference_new.xml
===================================================================
--- trunk/doc/reference_new.xml	2008-11-17 01:00:37 UTC (rev 3299)
+++ trunk/doc/reference_new.xml	2008-11-17 17:30:53 UTC (rev 3300)
@@ -10629,9 +10629,11 @@
 	    <title>Description</title>
 	
 	    <para>Returns the amount of space (in bytes) the geometry takes. </para>
-		<para>This is a nice compliment to PostgreSQL built in functions pg_size_pretty, pg_relation_size.</para>
-		<note><para>pg_relation_size which gives the full size of a table may return byte size lower than ST_Mem_Size. This is because
-		pg_relation_size does not add toasted table contribution where large geometries are stored.</para></note>
+		<para>This is a nice compliment to PostgreSQL built in functions pg_size_pretty, pg_relation_size, pg_total_relation_size.</para>
+		<note><para>pg_relation_size which gives the byte size of a table may return byte size lower than ST_Mem_Size. This is because
+		pg_relation_size does not add toasted table contribution and large geometries are stored in TOAST tables.</para>
+		<para>pg_total_relation_size - includes, the table, the toasted tables, and the indexes.</para>
+		</note>
 		
 	
 		<!-- Optionally mention 3d support -->
@@ -10670,6 +10672,13 @@
 ---
 73
 	
+--What percentage of our table is taken up by just the geometry
+SELECT pg_total_relation_size('public.neighborhoods') As fulltable_size, sum(ST_Mem_Size(the_geom)) As geomsize,
+sum(ST_Mem_Size(the_geom))*1.00/pg_total_relation_size('public.neighborhoods')*100 As pergeom
+FROM neighborhoods;
+fulltable_size geomsize  pergeom	
+------------------------------------------------
+262144         96238	 36.71188354492187500000
 	</programlisting>
 	  </refsection>
 	



More information about the postgis-commits mailing list