From 048991c9fa5179841811a759816697cc6e9749fc Mon Sep 17 00:00:00 2001
From: Simon Riggs <simon@2ndQuadrant.com>
Date: Fri, 21 Aug 2015 10:18:39 +0100
Subject: [PATCH 02/24] New docs section on Data Definition - Column Stores

---
 doc/src/sgml/ddl.sgml | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 91 insertions(+)

diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml
index af1bda6..92098e1 100644
--- a/doc/src/sgml/ddl.sgml
+++ b/doc/src/sgml/ddl.sgml
@@ -3310,6 +3310,97 @@ ANALYZE measurement;
   </sect2>
  </sect1>
 
+ <sect1 id="ddl-column-store">
+  <title>Column Store</title>
+
+   <indexterm>
+    <primary>column store</primary>
+   </indexterm>
+   <indexterm>
+    <primary>columnar storage</primary>
+   </indexterm>
+   <indexterm>
+    <primary>vertical partitioning</primary>
+   </indexterm>
+
+   <para>
+    By default, <productname>PostgreSQL</productname> places all columns
+    of a table together within a single main data structure, referred
+    to internally as the heap.
+   </para>
+
+   <para>
+    Optionally, <productname>PostgreSQL</productname> allows you to
+    specify that columns can be held in secondary data structures,
+    known as column stores. Each column store has a unique name and
+    contains data only for its master table. If a column definition
+    specifies a column store then values of that column for all rows
+    of a table are stored only in the column store - and not within
+    the main heap. This is completely different from TOAST, which is
+    designed to handle oversized attributes by breaking them up into
+    chunks and storing them in a single common subtable for all columns.
+    It is possible to store multiple columns within the same column store.
+   </para>
+
+   <para>
+    With this feature <productname>PostgreSQL</productname> can be described
+    as a hybrid row/column store. <productname>PostgreSQL</productname>
+    implements column stores by providing a flexible column store API,
+    allowing different types of storage to be designed for different datatypes
+    or for different use cases.
+    Column stores are also sometimes referred to as columnar storage or
+    vertical paritioning. This section describes why and how to implement column
+    stores or vertical partitioning as part of your database design.
+   </para>
+
+   <para>
+    Column stores provide the following advantages
+   <itemizedlist>
+    <listitem>
+     <para>
+      By grouping related columns together, data not required for the current
+      query or action will be completely avoided, significantly reducing query
+      time.
+     </para>
+    </listitem>
+    <listitem>
+     <para>
+      By grouping related columns together it is possible to take advantage of
+      high compression rates, reducing data storage requirements and reducing
+      query times for very large databases.
+     </para>
+    </listitem>
+    <listitem>
+     <para>
+      By separating data into multiple column stores, datatype-specific
+      storage optimizations will become possible, further extending
+      <productname>PostgreSQL</productname>'s support for custom datatypes.
+     </para>
+    </listitem>
+    <listitem>
+     <para>
+      By separating data into multiple subtables, it will be possible to
+      store tables that are much larger than the maximum table size for a single
+      heap (32TB).
+     </para>
+    </listitem>
+    <listitem>
+     <para>
+      Reusing storage technology from other projects and/or using technology
+      with different licencing restrictions (GPL licence etc).
+     </para>
+    </listitem>
+    <listitem>
+     <para>
+      Provides an architecture that may eventually allow us to have tables
+      with more than 1600 columns.
+     </para>
+    </listitem>
+   </itemizedlist>
+   </para>
+
+ </sect1>
+
  <sect1 id="ddl-foreign-data">
   <title>Foreign Data</title>
 
-- 
2.1.4

