List:Commits« Previous MessageNext Message »
From:jon.stephens Date:March 11 2011 12:42pm
Subject:svn commit - mysqldoc@oter02: r25352 - in trunk: refman-5.0 refman-5.1
View as plain text  
Author: js221926
Date: 2011-03-11 13:42:16 +0100 (Fri, 11 Mar 2011)
New Revision: 25352

Log:

Clarified behaviour of NDB with regard to UK/PK + USING HASH on nullable columns

(Thanks, Geert!)



Modified:
   trunk/refman-5.0/sql-syntax-data-definition.xml
   trunk/refman-5.1/sql-syntax-data-definition.xml


Modified: trunk/refman-5.0/sql-syntax-data-definition.xml
===================================================================
--- trunk/refman-5.0/sql-syntax-data-definition.xml	2011-03-11 12:04:46 UTC (rev 25351)
+++ trunk/refman-5.0/sql-syntax-data-definition.xml	2011-03-11 12:42:16 UTC (rev 25352)
Changed blocks: 1, Lines Added: 16, Lines Deleted: 13; 2234 bytes

@@ -1832,22 +1832,25 @@
 
     <note>
       <para>
-        For indexes on <literal role="se">NDBCLUSTER</literal> table
-        columns, the <literal>USING</literal> clause can be specified
-        only for a unique index or primary key. In such cases, the
-        <literal>USING HASH</literal> clause prevents the creation of an
-        implicit ordered index. Without <literal>USING HASH</literal>, a
-        statement defining a unique index or primary key automatically
-        results in the creation of a <literal>HASH</literal> index in
-        addition to the ordered index, both of which index the same set
-        of columns.
+        For indexes on <literal role="se">NDB</literal> table columns,
+        the <literal>USING</literal> option can be specified only for a
+        unique index or primary key. <literal>USING HASH</literal>
+        prevents the creation of an implicit ordered index; otherwise,
+        creating a unique index or primary key on an
+        <literal role="se">NDB</literal> table automatically results in
+        the creation of both an ordered index and a hash index, each of
+        which indexes the same set of columns.
       </para>
 
       <para>
-        This means that queries using unique index or primary columns
-        created as <literal>NULL</literal> on
-        <literal role="se">NDB</literal> tables are handled as full
-        table scans.
+        This means that a query using a unique index or primary key on a
+        <literal>NULL</literal> column is always handled by
+        <literal role="se">NDB</literal> with a full scan of the table.
+        In particular, if you plan to use an <literal>IS NULL</literal>
+        or <literal>IS NOT NULL</literal> condition involving a unique
+        index or primary key column of an
+        <literal role="se">NDB</literal> table, you should create any
+        such index without <literal>USING HASH</literal>.
       </para>
     </note>
 


Modified: trunk/refman-5.1/sql-syntax-data-definition.xml
===================================================================
--- trunk/refman-5.1/sql-syntax-data-definition.xml	2011-03-11 12:04:46 UTC (rev 25351)
+++ trunk/refman-5.1/sql-syntax-data-definition.xml	2011-03-11 12:42:16 UTC (rev 25352)
Changed blocks: 1, Lines Added: 17, Lines Deleted: 13; 2386 bytes

@@ -4181,22 +4181,26 @@
 
         <note>
           <para>
-            For indexes on <literal role="se">NDBCLUSTER</literal> table
-            columns, the <literal>USING</literal> clause can be
-            specified only for a unique index or primary key. In such
-            cases, the <literal>USING HASH</literal> clause prevents the
-            creation of an implicit ordered index. Without
-            <literal>USING HASH</literal>, a statement defining a unique
-            index or primary key automatically results in the creation
-            of a <literal>HASH</literal> index in addition to the
-            ordered index, both of which index the same set of columns.
+            For indexes on <literal role="se">NDB</literal> table
+            columns, the <literal>USING</literal> option can be
+            specified only for a unique index or primary key.
+            <literal>USING HASH</literal> prevents the creation of an
+            implicit ordered index; otherwise, creating a unique index
+            or primary key on an <literal role="se">NDB</literal> table
+            automatically results in the creation of both an ordered
+            index and a hash index, each of which indexes the same set
+            of columns.
           </para>
 
           <para>
-            This means that queries using unique index or primary
-            columns created as <literal>NULL</literal> on
-            <literal role="se">NDB</literal> tables are handled as full
-            table scans.
+            This means that a query using a unique index or primary key
+            on a <literal>NULL</literal> column is always handled by
+            <literal role="se">NDB</literal> with a full scan of the
+            table. In particular, if you plan to use an <literal>IS
+            NULL</literal> or <literal>IS NOT NULL</literal> condition
+            involving a unique index or primary key column of an
+            <literal role="se">NDB</literal> table, you should create
+            any such index without <literal>USING HASH</literal>.
           </para>
         </note>
 


Thread
svn commit - mysqldoc@oter02: r25352 - in trunk: refman-5.0 refman-5.1jon.stephens11 Mar