List:Internals« Previous MessageNext Message »
From:jstephens Date:November 23 2005 11:06am
Subject:svn commit - mysqldoc@docsrva: r396 - trunk/refman-5.1
View as plain text  
Author: jstephens
Date: 2005-11-23 12:06:53 +0100 (Wed, 23 Nov 2005)
New Revision: 396

Log:

Some misc. fixes/cleanup to Partitioning chapter for 5.1.3 cloneoff.



Modified:
   trunk/refman-5.1/partitioning.xml

Modified: trunk/refman-5.1/partitioning.xml
===================================================================
--- trunk/refman-5.1/partitioning.xml	2005-11-23 09:14:23 UTC (rev 395)
+++ trunk/refman-5.1/partitioning.xml	2005-11-23 11:06:53 UTC (rev 396)
@@ -27,12 +27,13 @@
     concepts may be found in <xref linkend="partitioning-overview"/>.
     MySQL &current-series; supports several types of partitioning, which
     are discussed in <xref linkend="partitioning-types"/>, as well as
-    subpartitioning, which is described in
-    <xref linkend="partitioning-subpartitions"/>. Methods of adding,
-    removing, and altering partitions in existing partitioned tables are
-    covered in <xref linkend="partitioning-management"/>. Table
-    maintenance commands for use with partitioned tables are discussed
-    in <xref linkend="partitioning-maintenance"/>.
+    subpartitioning (also known sometimes as composite partitioning),
+    which is described in <xref linkend="partitioning-subpartitions"/>.
+    Methods of adding, removing, and altering partitions in existing
+    partitioned tables are covered in <xref
+      linkend="partitioning-management"/>. Table maintenance commands
+    for use with partitioned tables are discussed in <xref
+      linkend="partitioning-maintenance"/>.
   </para>
 
   <para>
@@ -117,14 +118,16 @@
   </itemizedlist>
 
   <para>
-    A binary distribution of MySQL 5.1 has not yet been made available;
-    however, you can obtain the source from our BitKeeper repository. To
-    enable partitioning, you need to compile the server using the
+    A MySQL 5.1 alpha binary is now available. However, for the latest
+    partitioning bugfixes and feature additions, you can obtain the
+    source from our BitKeeper repository. To enable partitioning, you
+    need to compile the server using the
     <option>--with-partition</option> option. For more information about
     building MySQL, see <xref linkend="installing-source"/>. If you have
     problems compiling a partitioning-enabled MySQL 5.1 build, check the
-    MySQL Partitioning Forum and ask for assistance there if you don't
-    find a solution to your problem already posted.
+    <ulink url="http://forums.mysql.com/list.php?106">MySQL Partitioning
+      Forum</ulink> and ask for assistance there if you don't find a
+    solution to your problem already posted.
   </para>
 
   <section id="partitioning-overview">
@@ -185,6 +188,16 @@
       partitioning syntax descriptions given in
       <xref linkend="create-table"/>.
     </para>
+    
+    <para>
+      This is known as <firstterm>horizontal partitioning</firstterm>
+      &mdash; that is, different rows of a table may be assigned to
+      different physical partitions. MySQL &current-series; does not
+      support <firstterm>vertical partitioning</firstterm>, in which
+      different columns of a table are assigned to different physical
+      partitions. There are not at this time any plans to introduce
+      vertical partitioning into MySQL &current-series;.
+    </para>
 
     <indexterm>
       <primary>partitioning, enabling</primary>
@@ -195,10 +208,9 @@
     </indexterm>
 
     <para>
-      Partitioning support will be included in the
-      <literal>-max</literal> releases of MySQL &current-series; when
-      binaries become available (that is, the 5.1
-      <literal>-max</literal> binaries will be built with
+      Partitioning support is included in the
+      <literal>-max</literal> releases of MySQL &current-series; (that
+      is, the 5.1 <literal>-max</literal> binaries will be built with
       <option>--with-partition</option>). If the MySQL binary is built
       with partitioning support, nothing further needs to be done in
       order to enable it (for example, no special entries are required
@@ -487,10 +499,10 @@
     </para>
 
     <para>
-      <emphasis role="bold">Note</emphasis>: In the sections that
-      follow, we do not necessarily provide all possible forms for the
-      syntax that can be used for creating each partition type; this
-      information may be found in <xref linkend="create-table"/>.
+      In the sections that follow, we do not necessarily provide all
+      possible forms for the syntax that can be used for creating each
+      partition type; this information may be found in 
+      <xref linkend="create-table"/>.
     </para>
 
     <section id="partitioning-range">
@@ -595,7 +607,7 @@
     PARTITION p0 VALUES LESS THAN (6),
     PARTITION p1 VALUES LESS THAN (11),
     PARTITION p2 VALUES LESS THAN (16),
-    PARTITION p3 VALUES LESS THAN MAXVALUE
+    <emphasis>PARTITION p3 VALUES LESS THAN MAXVALUE</emphasis>
 );
 </programlisting>
 
@@ -681,7 +693,7 @@
     job_code INT,
     store_id INT
 )
-PARTITION BY RANGE (YEAR(separated)) (
+PARTITION BY RANGE ( YEAR(separated) ) (
     PARTITION p0 VALUES LESS THAN (1991),
     PARTITION p1 VALUES LESS THAN (1996),
     PARTITION p2 VALUES LESS THAN (2001),
@@ -869,7 +881,7 @@
     job_code INT,
     store_id INT
 )
-PARTITION BY LIST(store_id)
+PARTITION BY LIST(store_id) (
     PARTITION pNorth VALUES IN (3,5,6,9,17),
     PARTITION pEast VALUES IN (1,2,10,11,19,20),
     PARTITION pWest VALUES IN (4,12,13,14,18),
@@ -911,17 +923,17 @@
         <literal>pEast</literal>, <literal>pWest</literal>, or
         <literal>pCentral</literal>. It is important to note that there
         is no <quote>catch-all</quote> definition for list partitions
-        analogous to <literal>VALUES LESS THAN MAXVALUE</literal> for
-        accommodating values not found in any of the value lists. Any
-        value which is to be matched must be found in one of the value
-        lists.
+        analogous to <literal>VALUES LESS THAN MAXVALUE</literal> which
+        accommodates values not found in any of the value lists. In
+        other words, <emphasis>any value which is to be matched must be
+          found in one of the value lists</emphasis>.
       </para>
 
       <para>
         As with <literal>RANGE</literal> partitioning, it is possible to
         combine <literal>LIST</literal> partitioning with partitioning
-        by hash or key to produce a composite subpartitioning. For a
-        discussion of this, see
+        by hash or key to produce a composite partitioning
+        (subpartitioning). See
         <xref linkend="partitioning-subpartitions"/>.
       </para>
 
@@ -1019,7 +1031,7 @@
     job_code INT,
     store_id INT
 )
-PARTITION BY HASH(YEAR(hired))
+PARTITION BY HASH( YEAR(hired) )
 PARTITIONS 4;
 </programlisting>
 
@@ -1141,7 +1153,8 @@
 </programlisting>
 
       <para>
-        MySQL &current-series; also supports a variant known as
+        MySQL &current-series; also supports a variant of
+        <literal>HASH</literal> partitioning known as 
         <firstterm>linear hashing</firstterm> which employs a more
         complex algorithm for determining the placement of new rows
         inserted into the partitioned table. See
@@ -1412,17 +1425,17 @@
       </indexterm>
 
       <para>
-        Subpartitioning is the further division of each partition in a
-        partitioned table. For example, consider the following
-        <literal>CREATE TABLE</literal> statement:
+        Subpartitioning &mdash; also known as <firstterm>composite
+          partitioning</firstterm> &mdash; is the further division of
+        each partition in a partitioned table. For example, consider the
+        following <literal>CREATE TABLE</literal> statement:
       </para>
 
 <programlisting>
 CREATE TABLE ts (id INT, purchased DATE)
     PARTITION BY RANGE(YEAR(purchased))
     SUBPARTITION BY HASH(TO_DAYS(purchased))
-    SUBPARTITIONS 2
-    (
+    SUBPARTITIONS 2 (
         PARTITION p0 VALUES LESS THAN (1990),
         PARTITION p1 VALUES LESS THAN (2000),
         PARTITION p2 VALUES LESS THAN MAXVALUE
@@ -1464,21 +1477,17 @@
 
 <programlisting>
 CREATE TABLE ts (id INT, purchased DATE)
-    PARTITION BY RANGE(YEAR(purchased))
-    SUBPARTITION BY HASH(TO_DAYS(purchased))
-    (
-        PARTITION p0 VALUES LESS THAN (1990)
-        (
+    PARTITION BY RANGE( YEAR(purchased) )
+    SUBPARTITION BY HASH( TO_DAYS(purchased) ) (
+        PARTITION p0 VALUES LESS THAN (1990) (
             SUBPARTITION s0,
             SUBPARTITION s1
         ),
-        PARTITION p1 VALUES LESS THAN (2000)
-        (
+        PARTITION p1 VALUES LESS THAN (2000) (
             SUBPARTITION s2,
             SUBPARTITION s3
         ),
-        PARTITION p2 VALUES LESS THAN MAXVALUE
-        (
+        PARTITION p2 VALUES LESS THAN MAXVALUE (
             SUBPARTITION s4,
             SUBPARTITION s5
         )
@@ -1507,17 +1516,14 @@
 
 <programlisting>
 CREATE TABLE ts (id INT, purchased DATE)
-    PARTITION BY RANGE(YEAR(purchased))
-    SUBPARTITION BY HASH(TO_DAYS(purchased))
-    (
-        PARTITION p0 VALUES LESS THAN (1990)
-        (
+    PARTITION BY RANGE( YEAR(purchased) )
+    SUBPARTITION BY HASH( TO_DAYS(purchased) ) (
+        PARTITION p0 VALUES LESS THAN (1990) (
             SUBPARTITION s0,
             SUBPARTITION s1
         ),
         PARTITION p1 VALUES LESS THAN (2000),
-        PARTITION p2 VALUES LESS THAN MAXVALUE
-        (
+        PARTITION p2 VALUES LESS THAN MAXVALUE (
             SUBPARTITION s2,
             SUBPARTITION s3
         )
@@ -1549,21 +1555,17 @@
 
 <programlisting>
 CREATE TABLE ts (id INT, purchased DATE)
-    PARTITION BY RANGE(YEAR(purchased))
-    SUBPARTITION BY HASH(TO_DAYS(purchased))
-    (
-        PARTITION p0 VALUES LESS THAN (1990)
-        (
+    PARTITION BY RANGE( YEAR(purchased) )
+    SUBPARTITION BY HASH( TO_DAYS(purchased) ) (
+        PARTITION p0 VALUES LESS THAN (1990) (
             SUBPARTITION s0,
             SUBPARTITION s1
         ),
-        PARTITION p1 VALUES LESS THAN (2000)
-        (
+        PARTITION p1 VALUES LESS THAN (2000) (
             SUBPARTITION s0,
             SUBPARTITION s1
         ),
-        PARTITION p2 VALUES LESS THAN MAXVALUE
-        (
+        PARTITION p2 VALUES LESS THAN MAXVALUE (
             SUBPARTITION s0,
             SUBPARTITION s1
         )
@@ -1583,11 +1585,9 @@
 
 <programlisting>
 CREATE TABLE ts (id INT, purchased DATE)
-    PARTITION BY RANGE(YEAR(purchased))
-    SUBPARTITION BY HASH(TO_DAYS(purchased))
-    (
-        PARTITION p0 VALUES LESS THAN (1990)
-        (
+    PARTITION BY RANGE( YEAR(purchased) )
+    SUBPARTITION BY HASH( TO_DAYS(purchased) ) (
+        PARTITION p0 VALUES LESS THAN (1990) (
             SUBPARTITION s0 
                 DATA DIRECTORY = '/disk0/data' 
                 INDEX DIRECTORY = '/disk0/idx',
@@ -1595,8 +1595,7 @@
                 DATA DIRECTORY = '/disk1/data' 
                 INDEX DIRECTORY = '/disk1/idx'
         ),
-        PARTITION p1 VALUES LESS THAN (2000)
-        (
+        PARTITION p1 VALUES LESS THAN (2000) (
             SUBPARTITION s0 
                 DATA DIRECTORY = '/disk2/data' 
                 INDEX DIRECTORY = '/disk2/idx',
@@ -1604,8 +1603,7 @@
                 DATA DIRECTORY = '/disk3/data' 
                 INDEX DIRECTORY = '/disk3/idx'
         ),
-        PARTITION p2 VALUES LESS THAN MAXVALUE
-        (
+        PARTITION p2 VALUES LESS THAN MAXVALUE (
             SUBPARTITION s0 
                 DATA DIRECTORY = '/disk4/data' 
                 INDEX DIRECTORY = '/disk4/idx',
@@ -1625,10 +1623,8 @@
 <programlisting>
 CREATE TABLE ts (id INT, purchased DATE)
     PARTITION BY RANGE(YEAR(purchased))
-    SUBPARTITION BY HASH(TO_DAYS(purchased))
-    (
-        PARTITION p0 VALUES LESS THAN (1990)
-        (
+    SUBPARTITION BY HASH(TO_DAYS(purchased)) (
+        PARTITION p0 VALUES LESS THAN (1990) (
             SUBPARTITION s0a 
                 DATA DIRECTORY = '/disk0' 
                 INDEX DIRECTORY = '/disk1',
@@ -1636,8 +1632,7 @@
                 DATA DIRECTORY = '/disk2' 
                 INDEX DIRECTORY = '/disk3'
         ),
-        PARTITION p1 VALUES LESS THAN (2000)
-        (
+        PARTITION p1 VALUES LESS THAN (2000) (
             SUBPARTITION s1a 
                 DATA DIRECTORY = '/disk4/data' 
                 INDEX DIRECTORY = '/disk4/idx',
@@ -1645,8 +1640,7 @@
                 DATA DIRECTORY = '/disk5/data' 
                 INDEX DIRECTORY = '/disk5/idx'
         ),
-        PARTITION p2 VALUES LESS THAN MAXVALUE
-        (
+        PARTITION p2 VALUES LESS THAN MAXVALUE (
             SUBPARTITION s2a,
             SUBPARTITION s2b
         )
@@ -2066,8 +2060,7 @@
 
 <programlisting>
 CREATE TABLE trb3 (id INT, name VARCHAR(50), purchased DATE)
-    PARTITION BY RANGE(YEAR(purchased))
-    (
+    PARTITION BY RANGE( YEAR(purchased) ) (
         PARTITION p0 VALUES LESS THAN (1990),
         PARTITION p1 VALUES LESS THAN (1995),
         PARTITION p2 VALUES LESS THAN (2000),
@@ -2135,8 +2128,7 @@
 
 <programlisting>
 mysql&gt; <userinput>CREATE TABLE tr (id INT, name VARCHAR(50), purchased DATE)</userinput>
-    -&gt;     <userinput>PARTITION BY RANGE(YEAR(purchased))</userinput>
-    -&gt;     <userinput>(</userinput>
+    -&gt;     <userinput>PARTITION BY RANGE( YEAR(purchased) ) (</userinput>
     -&gt;         <userinput>PARTITION p0 VALUES LESS THAN (1990),</userinput>
     -&gt;         <userinput>PARTITION p1 VALUES LESS THAN (1995),</userinput>
     -&gt;         <userinput>PARTITION p2 VALUES LESS THAN (2000),</userinput>
@@ -2228,7 +2220,7 @@
   `name` varchar(50) default NULL,
   `purchased` date default NULL
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 
-PARTITION BY RANGE (YEAR(purchased)) (
+PARTITION BY RANGE ( YEAR(purchased) ) (
   PARTITION p0 VALUES LESS THAN (1990) ENGINE = MyISAM, 
   PARTITION p1 VALUES LESS THAN (1995) ENGINE = MyISAM, 
   PARTITION p3 VALUES LESS THAN (2005) ENGINE = MyISAM
@@ -2310,7 +2302,7 @@
     lname VARCHAR(25), 
     dob DATE
 )
-PARTITION BY RANGE(YEAR(dob)) (
+PARTITION BY RANGE( YEAR(dob) ) (
     PARTITION p0 VALUES LESS THAN (1970),
     PARTITION p1 VALUES LESS THAN (1980),
     PARTITION p2 VALUES LESS THAN (1990)
@@ -2420,7 +2412,7 @@
   `lname` varchar(25) default NULL,
   `dob` date default NULL
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 
-PARTITION BY RANGE (YEAR(dob)) (
+PARTITION BY RANGE ( YEAR(dob) ) (
   PARTITION p0 VALUES LESS THAN (1970) ENGINE = MyISAM, 
   PARTITION p1 VALUES LESS THAN (1980) ENGINE = MyISAM, 
   PARTITION p2 VALUES LESS THAN (1990) ENGINE = MyISAM.
@@ -2620,12 +2612,12 @@
 
           <remark role="todo">
             [js] Remove this note when the referenced command is
-            implemented (expected prior to alpha release).
+            implemented.
           </remark>
 
           <para>
-            <emphasis role="bold">Note</emphasis>: In the pre-release
-            version of MySQL 5.1, <literal>ALTER TABLE ... PARTITION BY
+            <emphasis role="bold">Note</emphasis>: In MySQL 5.1
+            &current-version;, <literal>ALTER TABLE ... PARTITION BY
             ...</literal> is not yet implemented. Instead, you must
             either drop and re-create the table using the desired
             partitioning, or &mdash; if you need to retain data already

Thread
svn commit - mysqldoc@docsrva: r396 - trunk/refman-5.1jstephens23 Nov