Author: paul
Date: 2010-08-03 15:56:23 +0200 (Tue, 03 Aug 2010)
New Revision: 22050
Log:
r41381@arctic: paul | 2010-08-03 08:56:02 -0500
After merge fix
Modified:
trunk/refman-5.5/optimization.xml
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- 07c7e7b4-24e3-4b51-89d0-6dc09fec6bec:/mysqldoc-local/mysqldoc/trunk:35498
07c7e7b4-24e3-4b51-89d0-6dc09fec6bec:/mysqldoc-local/trunk:41368
4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:43968
4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/trunk:44480
7d8d2c4e-af1d-0410-ab9f-b038ce55645b:/mysqldoc-local/mysqldoc:61887
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:14218
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:39036
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/trunk:39546
+ 07c7e7b4-24e3-4b51-89d0-6dc09fec6bec:/mysqldoc-local/mysqldoc/trunk:35498
07c7e7b4-24e3-4b51-89d0-6dc09fec6bec:/mysqldoc-local/trunk:41381
4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:43968
4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/trunk:44480
7d8d2c4e-af1d-0410-ab9f-b038ce55645b:/mysqldoc-local/mysqldoc:61887
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:14218
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:39036
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/trunk:39546
Modified: trunk/refman-5.5/optimization.xml
===================================================================
--- trunk/refman-5.5/optimization.xml 2010-08-03 13:52:17 UTC (rev 22049)
+++ trunk/refman-5.5/optimization.xml 2010-08-03 13:56:23 UTC (rev 22050)
Changed blocks: 29, Lines Added: 98, Lines Deleted: 108; 19829 bytes
@@ -360,19 +360,19 @@
<para>
To make your application <emphasis>really</emphasis> database
- independent, define an easily extendable interface
- through which you manipulate your data. For example, C++ is
- available on most systems, so it makes sense to use a C++
- class-based interface to the databases.
+ independent, define an easily extendable interface through which
+ you manipulate your data. For example, C++ is available on most
+ systems, so it makes sense to use a C++ class-based interface to
+ the databases.
</para>
<para>
If you use some feature that is specific to a given database
system (such as the <literal role="stmt">REPLACE</literal>
- statement, which is specific to MySQL), implement the
- same feature for other SQL servers by coding an alternative
- method. Although the alternative might be slower, it enables the
- other servers to perform the same tasks.
+ statement, which is specific to MySQL), implement the same
+ feature for other SQL servers by coding an alternative method.
+ Although the alternative might be slower, it enables the other
+ servers to perform the same tasks.
</para>
<para>
@@ -561,13 +561,13 @@
</indexterm>
<para>
- Benchmark your application and database to
- find out where the bottlenecks are. After fixing one bottleneck
- (or by replacing it with a <quote>dummy</quote> module), you can
- proceed to identify the next bottleneck. Even if the overall
- performance for your application currently is acceptable, you
- should at least make a plan for each bottleneck and decide how
- to solve it if someday you really need the extra performance.
+ Benchmark your application and database to find out where the
+ bottlenecks are. After fixing one bottleneck (or by replacing it
+ with a <quote>dummy</quote> module), you can proceed to identify
+ the next bottleneck. Even if the overall performance for your
+ application currently is acceptable, you should at least make a
+ plan for each bottleneck and decide how to solve it if someday
+ you really need the extra performance.
</para>
<para>
@@ -598,9 +598,8 @@
</para>
<para>
- To avoid problems like this,
- benchmark your whole application under the worst possible
- load:
+ To avoid problems like this, benchmark your whole application
+ under the worst possible load:
</para>
<itemizedlist>
@@ -729,10 +728,9 @@
<para>
If you have a problem with indexes not being used when you
- believe that they should be, run
- <literal role="stmt">ANALYZE TABLE</literal> to update table
- statistics such as cardinality of keys, that can affect the
- choices the optimizer makes. See
+ believe that they should be, run <literal role="stmt">ANALYZE
+ TABLE</literal> to update table statistics such as cardinality
+ of keys, that can affect the choices the optimizer makes. See
<xref linkend="analyze-table"/>.
</para>
@@ -2202,12 +2200,11 @@
Note that the <literal>rows</literal> column in the output from
<literal role="stmt">EXPLAIN</literal> is an educated guess from
- the MySQL join optimizer. Check whether the numbers
- are even close to the truth by comparing the
- <literal>rows</literal> product with the actual number of rows
- that the query returns. If the numbers are quite different, you
- might get better performance by using
- <literal>STRAIGHT_JOIN</literal> in your
+ the MySQL join optimizer. Check whether the numbers are even
+ close to the truth by comparing the <literal>rows</literal>
+ product with the actual number of rows that the query returns.
+ If the numbers are quite different, you might get better
+ performance by using <literal>STRAIGHT_JOIN</literal> in your
<literal role="stmt">SELECT</literal> statement and trying to
list the tables in a different order in the
<literal>FROM</literal> clause.
@@ -5649,8 +5646,8 @@
columns in the sort tuple does not exceed the value of the
<literal role="sysvar">max_length_for_sort_data</literal>
system variable. (A symptom of setting the value of this
- variable too high is a combination of high disk activity
- and low CPU activity.)
+ variable too high is a combination of high disk activity and
+ low CPU activity.)
</para>
<para>
@@ -6097,10 +6094,9 @@
<para>
Because <literal>DISTINCT</literal> may use <literal>GROUP
- BY</literal>, learn how MySQL works with
- columns in <literal>ORDER BY</literal> or
- <literal>HAVING</literal> clauses that are not part of the
- selected columns. See
+ BY</literal>, learn how MySQL works with columns in
+ <literal>ORDER BY</literal> or <literal>HAVING</literal>
+ clauses that are not part of the selected columns. See
<xref linkend="group-by-hidden-columns"/>.
</para>
@@ -8350,9 +8346,9 @@
table has no free blocks in the middle of the data file, you
can <literal role="stmt">INSERT</literal> new rows into it
at the same time that other threads are reading from the
- table. If it is important to be able to do this,
- consider using the table in ways that avoid deleting rows.
- Another possibility is to run <literal role="stmt">OPTIMIZE
+ table. If it is important to be able to do this, consider
+ using the table in ways that avoid deleting rows. Another
+ possibility is to run <literal role="stmt">OPTIMIZE
TABLE</literal> to defragment the table after you have
deleted a lot of rows from it. This behavior is altered by
setting the
@@ -8478,11 +8474,10 @@
<listitem>
<para>
- If possible, classify reports as
- <quote>live</quote> or as <quote>statistical,</quote> where
- data needed for statistical reports is created only from
- summary tables that are generated periodically from the live
- data.
+ If possible, classify reports as <quote>live</quote> or as
+ <quote>statistical,</quote> where data needed for
+ statistical reports is created only from summary tables that
+ are generated periodically from the live data.
</para>
</listitem>
@@ -8508,12 +8503,11 @@
<listitem>
<para>
- Normally, try to keep all data nonredundant
- (observing what is referred to in database theory as
- <firstterm>third normal form</firstterm>). However, there
- may be situations in which it can be advantageous to
- duplicate information or create summary tables to gain more
- speed.
+ Normally, try to keep all data nonredundant (observing what
+ is referred to in database theory as <firstterm>third normal
+ form</firstterm>). However, there may be situations in which
+ it can be advantageous to duplicate information or create
+ summary tables to gain more speed.
</para>
</listitem>
@@ -8647,9 +8641,9 @@
<listitem>
<para>
- If you need really high speed, look at the
- low-level interfaces for data storage that the different SQL
- servers support. For example, by accessing the MySQL
+ If you need really high speed, look at the low-level
+ interfaces for data storage that the different SQL servers
+ support. For example, by accessing the MySQL
<literal>MyISAM</literal> storage engine directly, you could
get a speed increase of two to five times compared to using
the SQL interface. To be able to do this, the data must be
@@ -8692,8 +8686,8 @@
<literal>DELAY_KEY_WRITE=1</literal> table option makes
index updates faster because they are not flushed to disk
until the table is closed. The downside is that if something
- kills the server while such a table is open, you must
- ensure that the table is okay by running the server with the
+ kills the server while such a table is open, you must ensure
+ that the table is okay by running the server with the
<option role="mysqld">--myisam-recover-options</option>
option, or by running <command>myisamchk</command> before
restarting the server. (However, even in this case, you
@@ -10982,9 +10976,9 @@
<para>
The query cache offers the potential for substantial performance
- improvement, but do not assume that it will do so under
- all circumstances. With some query cache configurations or
- server workloads, you might actually see a performance decrease:
+ improvement, but do not assume that it will do so under all
+ circumstances. With some query cache configurations or server
+ workloads, you might actually see a performance decrease:
</para>
<itemizedlist>
@@ -11387,8 +11381,7 @@
<literal role="sysvar">query_cache_size</literal> system
variable. Setting it to 0 disables the query cache. The
default size is 0, so the query cache is disabled by default.
- To reduce overhead significantly, also start the
- server with
+ To reduce overhead significantly, also start the server with
<literal role="sysvar">query_cache_type=0</literal> if you
will not be using the query cache.
</para>
@@ -11417,9 +11410,9 @@
configuration. The query cache is also controlled by the
setting of the
<literal role="sysvar">query_cache_type</literal> variable.
- Check the values of these variables as set in
- your <filename>my.ini</filename> file after configuration
- has taken place.
+ Check the values of these variables as set in your
+ <filename>my.ini</filename> file after configuration has
+ taken place.
</para>
</note>
@@ -11595,8 +11588,8 @@
default block size may lead to memory fragmentation, as
indicated by a large number of free blocks. Fragmentation
can force the query cache to prune (delete) queries from
- the cache due to lack of memory. In this case,
- decrease the value of
+ the cache due to lack of memory. In this case, decrease
+ the value of
<literal role="sysvar">query_cache_min_res_unit</literal>.
The number of free blocks and queries removed due to
pruning are given by the values of the
@@ -11862,12 +11855,12 @@
<para>
To decide whether you want to use a storage engine with
- row-level locking, look at what your application does
- and what mix of select and update statements it uses. For
- example, most Web applications perform many selects, relatively
- few deletes, updates based mainly on key values, and inserts
- into a few specific tables. The base MySQL
- <literal>MyISAM</literal> setup is very well tuned for this.
+ row-level locking, look at what your application does and what
+ mix of select and update statements it uses. For example, most
+ Web applications perform many selects, relatively few deletes,
+ updates based mainly on key values, and inserts into a few
+ specific tables. The base MySQL <literal>MyISAM</literal> setup
+ is very well tuned for this.
</para>
<formalpara role="mnmas">
@@ -12658,10 +12651,10 @@
<command>myisampack</command> to pack tables, you
<emphasis>must</emphasis> always ensure that the
<command>mysqld</command> server is not using the table. If
- you don't stop <command>mysqld</command>, at
- least do a <command>mysqladmin flush-tables</command> before
- you run <command>myisamchk</command>. Your tables
- <emphasis>may become corrupted</emphasis> if the server and
+ you don't stop <command>mysqld</command>, at least do a
+ <command>mysqladmin flush-tables</command> before you run
+ <command>myisamchk</command>. Your tables <emphasis>may
+ become corrupted</emphasis> if the server and
<command>myisamchk</command> access the tables
simultaneously.
</para>
@@ -12733,8 +12726,8 @@
<listitem>
<para>
- Do not use the query cache for queries that use
- tables that are updated by another process.
+ Do not use the query cache for queries that use tables that
+ are updated by another process.
</para>
</listitem>
@@ -13078,8 +13071,8 @@
<para>
<literal role="sysvar">table_open_cache</literal> is related to
<literal role="sysvar">max_connections</literal>. For example,
- for 200 concurrent running connections, specify a table
- cache size of at least <literal>200 *
+ for 200 concurrent running connections, specify a table cache
+ size of at least <literal>200 *
<replaceable>N</replaceable></literal>, where
<replaceable>N</replaceable> is the maximum number of tables per
join in any of the queries which you execute. You must also
@@ -13439,8 +13432,8 @@
200MB memory to compile <filename>sql_yacc.cc</filename> with
these options, because <command>gcc</command> or
<command>pgcc</command> needs a great deal of memory to make all
- functions inline. Also, set <literal>CXX=gcc</literal>
- when configuring MySQL to avoid inclusion of the
+ functions inline. Also, set <literal>CXX=gcc</literal> when
+ configuring MySQL to avoid inclusion of the
<literal>libstdc++</literal> library, which is not needed. Note
that with some versions of <command>pgcc</command>, the
resulting binary runs only on true Pentium processors, even if
@@ -13464,8 +13457,8 @@
<para>
The standard MySQL binary distributions are compiled with
support for all character sets. When you compile MySQL yourself,
- include support only for the character sets that you
- are going to use. This is controlled by the
+ include support only for the character sets that you are going
+ to use. This is controlled by the
<option role="configure">--with-charset</option> option to
<command>configure</command>.
</para>
@@ -13608,10 +13601,9 @@
its threads implementation works well) or Linux (because the 2.4
and later kernels have good SMP support). Note that older Linux
kernels have a 2GB filesize limit by default. If you have such a
- kernel and a need for files larger than 2GB, get the
- Large File Support (LFS) patch for the ext2 file system. Other
- file systems such as ReiserFS and XFS do not have this 2GB
- limitation.
+ kernel and a need for files larger than 2GB, get the Large File
+ Support (LFS) patch for the ext2 file system. Other file systems
+ such as ReiserFS and XFS do not have this 2GB limitation.
</para>
<para>
@@ -14107,9 +14099,9 @@
<para>
If you are performing <literal>GROUP BY</literal> or
<literal>ORDER BY</literal> operations on tables that are much
- larger than your available memory, increase the value
- of <literal role="sysvar">read_rnd_buffer_size</literal> to
- speed up the reading of rows following sorting operations.
+ larger than your available memory, increase the value of
+ <literal role="sysvar">read_rnd_buffer_size</literal> to speed
+ up the reading of rows following sorting operations.
</para>
<para>
@@ -14758,8 +14750,8 @@
<para>
However, if you really need to do this, it is possible by
altering the source file
- <filename>mysys/my_symlink.c</filename>.
- Look for the following statement:
+ <filename>mysys/my_symlink.c</filename>. Look for the
+ following statement:
</para>
<programlisting>
@@ -14787,12 +14779,11 @@
</indexterm>
<para>
- Do not symlink tables on systems that do not have a
- fully operational <literal>realpath()</literal> call. (Linux
- and Solaris support <literal>realpath()</literal>).
- Check whether your system supports symbolic links by issuing a
- <literal>SHOW VARIABLES LIKE 'have_symlink'</literal>
- statement.
+ Do not symlink tables on systems that do not have a fully
+ operational <literal>realpath()</literal> call. (Linux and
+ Solaris support <literal>realpath()</literal>). Check whether
+ your system supports symbolic links by issuing a <literal>SHOW
+ VARIABLES LIKE 'have_symlink'</literal> statement.
</para>
<para>
@@ -14868,11 +14859,10 @@
When you drop a table that is using symlinks,
<emphasis>both the symlink and the file to which the
symlink points are dropped</emphasis>. This is an
- extremely good reason
- <emphasis>not</emphasis> to run <command>mysqld</command>
- as the system <literal>root</literal> or permit system
- users to have write access to MySQL database
- directories.
+ extremely good reason <emphasis>not</emphasis> to run
+ <command>mysqld</command> as the system
+ <literal>root</literal> or permit system users to have
+ write access to MySQL database directories.
</para>
</note>
</listitem>
@@ -15033,11 +15023,11 @@
Make sure that the <filename>D:\data\foo</filename>
directory exists by creating it if necessary. If you
already have a database directory named
- <filename>foo</filename> in the data directory,
- move it to <filename>D:\data</filename>. Otherwise, the
- symbolic link will be ineffective. To avoid problems, make
- sure that the server is not running when you move the
- database directory.
+ <filename>foo</filename> in the data directory, move it to
+ <filename>D:\data</filename>. Otherwise, the symbolic link
+ will be ineffective. To avoid problems, make sure that the
+ server is not running when you move the database
+ directory.
</para>
</listitem>
@@ -16296,8 +16286,8 @@
<para>
The thread is flushing the changed table data to disk and
closing the used tables. This should be a fast operation. If
- not, verify that you do not have a full disk and
- that the disk is not in very heavy use.
+ not, verify that you do not have a full disk and that the
+ disk is not in very heavy use.
</para>
</listitem>

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.