List:Commits« Previous MessageNext Message »
From:paul Date:May 13 2008 5:26pm
Subject:svn commit - mysqldoc@docsrva: r10723 - in trunk: . it/refman-5.1 pt/refman-5.1 refman-4.1 refman-5.0 refman-5.1 refman-6.0
View as plain text  
Author: paul
Date: 2008-05-13 17:26:42 +0200 (Tue, 13 May 2008)
New Revision: 10723

Log:
 r31222@arctic:  paul | 2008-05-13 10:25:21 -0500
 Describe the use of max_heap_table_size for sizing individual
 MEMORY tables. (Josh)


Modified:
   trunk/it/refman-5.1/se-memory.xml
   trunk/pt/refman-5.1/se-memory.xml
   trunk/refman-4.1/storage-engines.xml
   trunk/refman-5.0/se-memory.xml
   trunk/refman-5.1/se-memory.xml
   trunk/refman-6.0/se-memory.xml

Property changes on: trunk
___________________________________________________________________
Name: svk:merge
   - 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:35828
7d8d2c4e-af1d-0410-ab9f-b038ce55645b:/mysqldoc-local/mysqldoc:31339
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:14218
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:31213
   + 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:35828
7d8d2c4e-af1d-0410-ab9f-b038ce55645b:/mysqldoc-local/mysqldoc:31339
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:14218
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:31222


Modified: trunk/it/refman-5.1/se-memory.xml
===================================================================
--- trunk/it/refman-5.1/se-memory.xml	2008-05-13 14:07:10 UTC (rev 10722)
+++ trunk/it/refman-5.1/se-memory.xml	2008-05-13 15:26:42 UTC (rev 10723)
Changed blocks: 2, Lines Added: 47, Lines Deleted: 4; 2935 bytes

@@ -224,10 +224,15 @@
             The maximum size of <literal>MEMORY</literal> tables is
             limited by the <literal>max_heap_table_size</literal> system
             variable, which has a default value of 16MB. To have larger
-            <literal>MEMORY</literal> tables, you must increase the
-            value of this variable. For individual tables, you can also
-            specify a <literal>MAX_ROWS</literal> table option in the
-            <literal>CREATE TABLE</literal> statement.
+            (or smaller) <literal>MEMORY</literal> tables, you must
+            change the value of this variable. The value in effect at
+            the time a <literal>MEMORY</literal> table is created is the
+            value used for the life of the table. (If you use
+            <literal>ALTER TABLE</literal> or <literal>TRUNCATE
+            TABLE</literal>, the value in effect at that time becomes
+            the new maximum size for the table.) You can also set the
+            size for individual tables, as described later in this
+            section.
           </para>
         </listitem>
 

@@ -319,6 +324,44 @@
   </itemizedlist>
 
   <para>
+    As mentioned earlier, the <literal>max_heap_table_size</literal>
+    system variable sets the limit on the maximum size of
+    <literal>MEMORY</literal> tables. To control the maximum size for
+    individual tables, set the session value of this variable before
+    creating each table. (Do not change the global
+    <literal>max_heap_table_size</literal> value unless you intend the
+    value to be used for <literal>MEMORY</literal> tables created by all
+    clients.) The following example creates two
+    <literal>MEMORY</literal> tables, with a maximum size of 1MB and
+    2MB, respectively:
+  </para>
+
+<programlisting>
+<!--
+mysql> DROP TABLE IF EXISTS t1, t2;
+Query OK, 0 rows affected (0.00 sec)
+-->
+mysql&gt; <userinput>SET max_heap_table_size = 1024*1024;</userinput>
+Query OK, 0 rows affected (0.00 sec)
+
+mysql&gt; <userinput>CREATE TABLE t1 (id INT, UNIQUE(id)) ENGINE =
MEMORY;</userinput>
+Query OK, 0 rows affected (0.01 sec)
+
+mysql&gt; <userinput>SET max_heap_table_size = 1024*1024*2;</userinput>
+Query OK, 0 rows affected (0.00 sec)
+
+mysql&gt; <userinput>CREATE TABLE t2 (id INT, UNIQUE(id)) ENGINE =
MEMORY;</userinput>
+Query OK, 0 rows affected (0.00 sec)
+</programlisting>
+
+  <para>
+    You can also specify a <literal>MAX_ROWS</literal> table option in
+    <literal>CREATE TABLE</literal> statements for
+    <literal>MEMORY</literal> tables to provide a hint about the number
+    of rows you plan to store in them.
+  </para>
+
+  <para>
     <emphasis role="bold">Additional resources</emphasis>
   </para>
 


Modified: trunk/pt/refman-5.1/se-memory.xml
===================================================================
--- trunk/pt/refman-5.1/se-memory.xml	2008-05-13 14:07:10 UTC (rev 10722)
+++ trunk/pt/refman-5.1/se-memory.xml	2008-05-13 15:26:42 UTC (rev 10723)
Changed blocks: 2, Lines Added: 47, Lines Deleted: 4; 2935 bytes

@@ -224,10 +224,15 @@
             The maximum size of <literal>MEMORY</literal> tables is
             limited by the <literal>max_heap_table_size</literal> system
             variable, which has a default value of 16MB. To have larger
-            <literal>MEMORY</literal> tables, you must increase the
-            value of this variable. For individual tables, you can also
-            specify a <literal>MAX_ROWS</literal> table option in the
-            <literal>CREATE TABLE</literal> statement.
+            (or smaller) <literal>MEMORY</literal> tables, you must
+            change the value of this variable. The value in effect at
+            the time a <literal>MEMORY</literal> table is created is the
+            value used for the life of the table. (If you use
+            <literal>ALTER TABLE</literal> or <literal>TRUNCATE
+            TABLE</literal>, the value in effect at that time becomes
+            the new maximum size for the table.) You can also set the
+            size for individual tables, as described later in this
+            section.
           </para>
         </listitem>
 

@@ -319,6 +324,44 @@
   </itemizedlist>
 
   <para>
+    As mentioned earlier, the <literal>max_heap_table_size</literal>
+    system variable sets the limit on the maximum size of
+    <literal>MEMORY</literal> tables. To control the maximum size for
+    individual tables, set the session value of this variable before
+    creating each table. (Do not change the global
+    <literal>max_heap_table_size</literal> value unless you intend the
+    value to be used for <literal>MEMORY</literal> tables created by all
+    clients.) The following example creates two
+    <literal>MEMORY</literal> tables, with a maximum size of 1MB and
+    2MB, respectively:
+  </para>
+
+<programlisting>
+<!--
+mysql> DROP TABLE IF EXISTS t1, t2;
+Query OK, 0 rows affected (0.00 sec)
+-->
+mysql&gt; <userinput>SET max_heap_table_size = 1024*1024;</userinput>
+Query OK, 0 rows affected (0.00 sec)
+
+mysql&gt; <userinput>CREATE TABLE t1 (id INT, UNIQUE(id)) ENGINE =
MEMORY;</userinput>
+Query OK, 0 rows affected (0.01 sec)
+
+mysql&gt; <userinput>SET max_heap_table_size = 1024*1024*2;</userinput>
+Query OK, 0 rows affected (0.00 sec)
+
+mysql&gt; <userinput>CREATE TABLE t2 (id INT, UNIQUE(id)) ENGINE =
MEMORY;</userinput>
+Query OK, 0 rows affected (0.00 sec)
+</programlisting>
+
+  <para>
+    You can also specify a <literal>MAX_ROWS</literal> table option in
+    <literal>CREATE TABLE</literal> statements for
+    <literal>MEMORY</literal> tables to provide a hint about the number
+    of rows you plan to store in them.
+  </para>
+
+  <para>
     <emphasis role="bold">Additional resources</emphasis>
   </para>
 


Modified: trunk/refman-4.1/storage-engines.xml
===================================================================
--- trunk/refman-4.1/storage-engines.xml	2008-05-13 14:07:10 UTC (rev 10722)
+++ trunk/refman-4.1/storage-engines.xml	2008-05-13 15:26:42 UTC (rev 10723)
Changed blocks: 2, Lines Added: 47, Lines Deleted: 5; 3054 bytes

@@ -2640,11 +2640,15 @@
               The maximum size of <literal>MEMORY</literal> tables is
               limited by the <literal>max_heap_table_size</literal>
               system variable, which has a default value of 16MB. To
-              have larger <literal>MEMORY</literal> tables, you must
-              increase the value of this variable. For individual
-              tables, you can also specify a <literal>MAX_ROWS</literal>
-              table option in the <literal>CREATE TABLE</literal>
-              statement.
+              have larger (or smaller) <literal>MEMORY</literal> tables,
+              you must change the value of this variable. The value in
+              effect at the time a <literal>MEMORY</literal> table is
+              created is the value used for the life of the table. (If
+              you use <literal>ALTER TABLE</literal> or
+              <literal>TRUNCATE TABLE</literal>, the value in effect at
+              that time becomes the new maximum size for the table.) You
+              can also set the size for individual tables, as described
+              later in this section.
             </para>
           </listitem>
 

@@ -2726,6 +2730,44 @@
     </itemizedlist>
 
     <para>
+      As mentioned earlier, the <literal>max_heap_table_size</literal>
+      system variable sets the limit on the maximum size of
+      <literal>MEMORY</literal> tables. To control the maximum size for
+      individual tables, set the session value of this variable before
+      creating each table. (Do not change the global
+      <literal>max_heap_table_size</literal> value unless you intend the
+      value to be used for <literal>MEMORY</literal> tables created by
+      all clients.) The following example creates two
+      <literal>MEMORY</literal> tables, with a maximum size of 1MB and
+      2MB, respectively:
+    </para>
+
+<programlisting>
+<!--
+mysql> DROP TABLE IF EXISTS t1, t2;
+Query OK, 0 rows affected (0.00 sec)
+-->
+mysql&gt; <userinput>SET max_heap_table_size = 1024*1024;</userinput>
+Query OK, 0 rows affected (0.00 sec)
+
+mysql&gt; <userinput>CREATE TABLE t1 (id INT, UNIQUE(id)) ENGINE =
MEMORY;</userinput>
+Query OK, 0 rows affected (0.01 sec)
+
+mysql&gt; <userinput>SET max_heap_table_size = 1024*1024*2;</userinput>
+Query OK, 0 rows affected (0.00 sec)
+
+mysql&gt; <userinput>CREATE TABLE t2 (id INT, UNIQUE(id)) ENGINE =
MEMORY;</userinput>
+Query OK, 0 rows affected (0.00 sec)
+</programlisting>
+
+    <para>
+      You can also specify a <literal>MAX_ROWS</literal> table option in
+      <literal>CREATE TABLE</literal> statements for
+      <literal>MEMORY</literal> tables to provide a hint about the
+      number of rows you plan to store in them.
+    </para>
+
+    <para>
       <emphasis role="bold">Additional resources</emphasis>
     </para>
 


Modified: trunk/refman-5.0/se-memory.xml
===================================================================
--- trunk/refman-5.0/se-memory.xml	2008-05-13 14:07:10 UTC (rev 10722)
+++ trunk/refman-5.0/se-memory.xml	2008-05-13 15:26:42 UTC (rev 10723)
Changed blocks: 2, Lines Added: 47, Lines Deleted: 4; 2926 bytes

@@ -231,10 +231,15 @@
             The maximum size of <literal>MEMORY</literal> tables is
             limited by the <literal>max_heap_table_size</literal> system
             variable, which has a default value of 16MB. To have larger
-            <literal>MEMORY</literal> tables, you must increase the
-            value of this variable. For individual tables, you can also
-            specify a <literal>MAX_ROWS</literal> table option in the
-            <literal>CREATE TABLE</literal> statement.
+            (or smaller) <literal>MEMORY</literal> tables, you must
+            change the value of this variable. The value in effect at
+            the time a <literal>MEMORY</literal> table is created is the
+            value used for the life of the table. (If you use
+            <literal>ALTER TABLE</literal> or <literal>TRUNCATE
+            TABLE</literal>, the value in effect at that time becomes
+            the new maximum size for the table.) You can also set the
+            size for individual tables, as described later in this
+            section.
           </para>
         </listitem>
 

@@ -326,6 +331,44 @@
   </itemizedlist>
 
   <para>
+    As mentioned earlier, the <literal>max_heap_table_size</literal>
+    system variable sets the limit on the maximum size of
+    <literal>MEMORY</literal> tables. To control the maximum size for
+    individual tables, set the session value of this variable before
+    creating each table. (Do not change the global
+    <literal>max_heap_table_size</literal> value unless you intend the
+    value to be used for <literal>MEMORY</literal> tables created by all
+    clients.) The following example creates two
+    <literal>MEMORY</literal> tables, with a maximum size of 1MB and
+    2MB, respectively:
+  </para>
+
+<programlisting>
+<!--
+mysql> DROP TABLE IF EXISTS t1, t2;
+Query OK, 0 rows affected (0.00 sec)
+-->
+mysql&gt; <userinput>SET max_heap_table_size = 1024*1024;</userinput>
+Query OK, 0 rows affected (0.00 sec)
+
+mysql&gt; <userinput>CREATE TABLE t1 (id INT, UNIQUE(id)) ENGINE =
MEMORY;</userinput>
+Query OK, 0 rows affected (0.01 sec)
+
+mysql&gt; <userinput>SET max_heap_table_size = 1024*1024*2;</userinput>
+Query OK, 0 rows affected (0.00 sec)
+
+mysql&gt; <userinput>CREATE TABLE t2 (id INT, UNIQUE(id)) ENGINE =
MEMORY;</userinput>
+Query OK, 0 rows affected (0.00 sec)
+</programlisting>
+
+  <para>
+    You can also specify a <literal>MAX_ROWS</literal> table option in
+    <literal>CREATE TABLE</literal> statements for
+    <literal>MEMORY</literal> tables to provide a hint about the number
+    of rows you plan to store in them.
+  </para>
+
+  <para>
     <emphasis role="bold">Additional resources</emphasis>
   </para>
 


Modified: trunk/refman-5.1/se-memory.xml
===================================================================
--- trunk/refman-5.1/se-memory.xml	2008-05-13 14:07:10 UTC (rev 10722)
+++ trunk/refman-5.1/se-memory.xml	2008-05-13 15:26:42 UTC (rev 10723)
Changed blocks: 2, Lines Added: 47, Lines Deleted: 4; 2926 bytes

@@ -224,10 +224,15 @@
             The maximum size of <literal>MEMORY</literal> tables is
             limited by the <literal>max_heap_table_size</literal> system
             variable, which has a default value of 16MB. To have larger
-            <literal>MEMORY</literal> tables, you must increase the
-            value of this variable. For individual tables, you can also
-            specify a <literal>MAX_ROWS</literal> table option in the
-            <literal>CREATE TABLE</literal> statement.
+            (or smaller) <literal>MEMORY</literal> tables, you must
+            change the value of this variable. The value in effect at
+            the time a <literal>MEMORY</literal> table is created is the
+            value used for the life of the table. (If you use
+            <literal>ALTER TABLE</literal> or <literal>TRUNCATE
+            TABLE</literal>, the value in effect at that time becomes
+            the new maximum size for the table.) You can also set the
+            size for individual tables, as described later in this
+            section.
           </para>
         </listitem>
 

@@ -319,6 +324,44 @@
   </itemizedlist>
 
   <para>
+    As mentioned earlier, the <literal>max_heap_table_size</literal>
+    system variable sets the limit on the maximum size of
+    <literal>MEMORY</literal> tables. To control the maximum size for
+    individual tables, set the session value of this variable before
+    creating each table. (Do not change the global
+    <literal>max_heap_table_size</literal> value unless you intend the
+    value to be used for <literal>MEMORY</literal> tables created by all
+    clients.) The following example creates two
+    <literal>MEMORY</literal> tables, with a maximum size of 1MB and
+    2MB, respectively:
+  </para>
+
+<programlisting>
+<!--
+mysql> DROP TABLE IF EXISTS t1, t2;
+Query OK, 0 rows affected (0.00 sec)
+-->
+mysql&gt; <userinput>SET max_heap_table_size = 1024*1024;</userinput>
+Query OK, 0 rows affected (0.00 sec)
+
+mysql&gt; <userinput>CREATE TABLE t1 (id INT, UNIQUE(id)) ENGINE =
MEMORY;</userinput>
+Query OK, 0 rows affected (0.01 sec)
+
+mysql&gt; <userinput>SET max_heap_table_size = 1024*1024*2;</userinput>
+Query OK, 0 rows affected (0.00 sec)
+
+mysql&gt; <userinput>CREATE TABLE t2 (id INT, UNIQUE(id)) ENGINE =
MEMORY;</userinput>
+Query OK, 0 rows affected (0.00 sec)
+</programlisting>
+
+  <para>
+    You can also specify a <literal>MAX_ROWS</literal> table option in
+    <literal>CREATE TABLE</literal> statements for
+    <literal>MEMORY</literal> tables to provide a hint about the number
+    of rows you plan to store in them.
+  </para>
+
+  <para>
     <emphasis role="bold">Additional resources</emphasis>
   </para>
 


Modified: trunk/refman-6.0/se-memory.xml
===================================================================
--- trunk/refman-6.0/se-memory.xml	2008-05-13 14:07:10 UTC (rev 10722)
+++ trunk/refman-6.0/se-memory.xml	2008-05-13 15:26:42 UTC (rev 10723)
Changed blocks: 2, Lines Added: 47, Lines Deleted: 4; 2926 bytes

@@ -224,10 +224,15 @@
             The maximum size of <literal>MEMORY</literal> tables is
             limited by the <literal>max_heap_table_size</literal> system
             variable, which has a default value of 16MB. To have larger
-            <literal>MEMORY</literal> tables, you must increase the
-            value of this variable. For individual tables, you can also
-            specify a <literal>MAX_ROWS</literal> table option in the
-            <literal>CREATE TABLE</literal> statement.
+            (or smaller) <literal>MEMORY</literal> tables, you must
+            change the value of this variable. The value in effect at
+            the time a <literal>MEMORY</literal> table is created is the
+            value used for the life of the table. (If you use
+            <literal>ALTER TABLE</literal> or <literal>TRUNCATE
+            TABLE</literal>, the value in effect at that time becomes
+            the new maximum size for the table.) You can also set the
+            size for individual tables, as described later in this
+            section.
           </para>
         </listitem>
 

@@ -319,6 +324,44 @@
   </itemizedlist>
 
   <para>
+    As mentioned earlier, the <literal>max_heap_table_size</literal>
+    system variable sets the limit on the maximum size of
+    <literal>MEMORY</literal> tables. To control the maximum size for
+    individual tables, set the session value of this variable before
+    creating each table. (Do not change the global
+    <literal>max_heap_table_size</literal> value unless you intend the
+    value to be used for <literal>MEMORY</literal> tables created by all
+    clients.) The following example creates two
+    <literal>MEMORY</literal> tables, with a maximum size of 1MB and
+    2MB, respectively:
+  </para>
+
+<programlisting>
+<!--
+mysql> DROP TABLE IF EXISTS t1, t2;
+Query OK, 0 rows affected (0.00 sec)
+-->
+mysql&gt; <userinput>SET max_heap_table_size = 1024*1024;</userinput>
+Query OK, 0 rows affected (0.00 sec)
+
+mysql&gt; <userinput>CREATE TABLE t1 (id INT, UNIQUE(id)) ENGINE =
MEMORY;</userinput>
+Query OK, 0 rows affected (0.01 sec)
+
+mysql&gt; <userinput>SET max_heap_table_size = 1024*1024*2;</userinput>
+Query OK, 0 rows affected (0.00 sec)
+
+mysql&gt; <userinput>CREATE TABLE t2 (id INT, UNIQUE(id)) ENGINE =
MEMORY;</userinput>
+Query OK, 0 rows affected (0.00 sec)
+</programlisting>
+
+  <para>
+    You can also specify a <literal>MAX_ROWS</literal> table option in
+    <literal>CREATE TABLE</literal> statements for
+    <literal>MEMORY</literal> tables to provide a hint about the number
+    of rows you plan to store in them.
+  </para>
+
+  <para>
     <emphasis role="bold">Additional resources</emphasis>
   </para>
 


Thread
svn commit - mysqldoc@docsrva: r10723 - in trunk: . it/refman-5.1 pt/refman-5.1 refman-4.1 refman-5.0 refman-5.1 refman-6.0paul13 May