Index: performance_tips.xml
===================================================================
--- performance_tips.xml	(revision 4423)
+++ performance_tips.xml	(working copy)
@@ -136,5 +136,149 @@
     dimension geometries, restricting the UPDATE by "WHERE
     dimension(the_geom)&gt;2" skips re-writing of geometries that already are
     in 2D.</para>
+
   </sect1>
-</chapter>
\ No newline at end of file
+
+  <sect1>
+    <title>Tuning your configuration</title>
+
+    <para>These tips are taken from Kevin Neufeld's presentation "Tips for the
+    PostGIS Power User" at the FOSS4G 2007 conference.  Depending on your
+    use of PostGIS (for example, static data and complex analysis vs frequently
+    updated data and lots of users) these changes can provide significant
+    speedups to your queries.</para>
+    
+    <para>For a more tips (and better formatting), the original presentation 
+        is at
+        <ulink url="http://2007.foss4g.org/presentations/view.php?abstract_id=117">
+        http://2007.foss4g.org/presentations/view.php?abstract_id=117</ulink>.
+    </para>
+
+      <sect2>
+        <title>Startup</title>
+        
+        <para>
+          These settings are configured in postgresql.conf:
+        </para>
+        
+        <para>
+          checkpoint_segment_size
+        </para>
+        
+        <itemizedlist>
+          <listitem>
+            <para>
+              # of WAL files = 16MB each; default is 3
+            </para>
+          </listitem>
+          <listitem>
+            <para>
+              Set to at least 10 or 30 for databases with heavy write activity, or 
+              more for large database loads.
+            </para>
+          </listitem>
+          <listitem>
+            <para>
+              Possibly store the xlog on a separate disk device
+            </para>
+          </listitem>
+        </itemizedlist>
+        
+        <para>
+          constraint_exclusion
+        </para>
+        
+        <itemizedlist>
+          <listitem>
+            <para>
+              Default: off
+            </para>
+          </listitem>
+          <listitem>
+            <para>
+              Set to "on" to ensure the query planner will optimize as desired.
+            </para>
+          </listitem>
+        </itemizedlist>
+        
+        <para>
+          shared_buffers
+        </para>
+        
+        <itemizedlist>
+          <listitem>
+            <para>
+              Default: ~32MB
+            </para>
+          </listitem>
+          <listitem>
+            <para>
+              Set to about 1/3 to 3/4 of available RAM
+            </para>
+          </listitem>
+        </itemizedlist>        
+      </sect2>
+      
+      <sect2>
+        <title>Runtime</title>
+        
+        <para>
+          work_mem (the memory used for sort operations and complex queries)
+        </para>
+        
+        <itemizedlist>
+          <listitem>
+            <para>
+              Default: 1MB
+            </para>
+          </listitem>
+          <listitem>
+            <para>
+              Adjust up for large dbs, complex queries, lots of RAM
+            </para>
+          </listitem>
+          <listitem>
+            <para>
+              Adjust down for many concurrent users or low RAM.  
+            </para>
+          </listitem>
+          <listitem>
+            <para>
+                If you have lots of RAM and few developers:
+                <programlisting>
+                    SET work_mem TO 1200000;
+                </programlisting>
+            </para>
+          </listitem>
+        </itemizedlist>
+        
+        <para>
+          maintenance_work_mem (used for VACUUM, CREATE INDEX, etc.)
+        </para>
+        
+        <itemizedlist>
+          <listitem>
+            <para>
+              Default: 16MB
+            </para>
+          </listitem>
+          <listitem>
+            <para>
+              Generally too low - ties up I/O, locks objects while swapping memory
+            </para>
+          </listitem>
+          <listitem>
+            <para>
+              Recommend 32MB to 256MB on production servers w/lots of RAM, but depends
+              on the # of concurrent users.  If you have lots of RAM and few developers:
+                <programlisting>
+                    SET maintainence_work_mem TO 1200000;
+                </programlisting>
+            </para>
+          </listitem>
+        </itemizedlist>
+       
+      </sect2>
+      
+  </sect1>
+</chapter>    
\ No newline at end of file

