Commit 18eccc55 authored by monty@hundin.mysql.fi's avatar monty@hundin.mysql.fi

Added hints and information about ROW_FORMAT to manual

parent f8828f09
...@@ -3384,6 +3384,7 @@ around some differences. ...@@ -3384,6 +3384,7 @@ around some differences.
@node Extensions to ANSI, Differences from ANSI, Compatibility, Compatibility @node Extensions to ANSI, Differences from ANSI, Compatibility, Compatibility
@subsection MySQL Extensions to ANSI SQL92 @subsection MySQL Extensions to ANSI SQL92
@cindex hints
MySQL includes some extensions that you probably will not find in MySQL includes some extensions that you probably will not find in
other SQL databases. Be warned that if you use them, your code will not be other SQL databases. Be warned that if you use them, your code will not be
portable to other SQL servers. In some cases, you can write code that portable to other SQL servers. In some cases, you can write code that
...@@ -32392,11 +32393,13 @@ read the @code{GROUP BY} description. ...@@ -32392,11 +32393,13 @@ read the @code{GROUP BY} description.
@xref{Group by functions}. @xref{Group by functions}.
@item @item
@cindex hints
@code{SQL_BUFFER_RESULT} will force the result to be put into a temporary @code{SQL_BUFFER_RESULT} will force the result to be put into a temporary
table. This will help MySQL free the table locks early and will help table. This will help MySQL free the table locks early and will help
in cases where it takes a long time to send the result set to the client. in cases where it takes a long time to send the result set to the client.
@item @item
@cindex hints
@code{SQL_SMALL_RESULT}, a MySQL-specific option, can be used @code{SQL_SMALL_RESULT}, a MySQL-specific option, can be used
with @code{GROUP BY} or @code{DISTINCT} to tell the optimizer that the with @code{GROUP BY} or @code{DISTINCT} to tell the optimizer that the
result set will be small. In this case, MySQL will use fast result set will be small. In this case, MySQL will use fast
...@@ -32404,6 +32407,7 @@ temporary tables to store the resulting table instead of using sorting. In ...@@ -32404,6 +32407,7 @@ temporary tables to store the resulting table instead of using sorting. In
MySQL Version 3.23 this shouldn't normally be needed. MySQL Version 3.23 this shouldn't normally be needed.
@item @item
@cindex hints
@code{STRAIGHT_JOIN} forces the optimizer to join the tables in the order in @code{STRAIGHT_JOIN} forces the optimizer to join the tables in the order in
which they are listed in the @code{FROM} clause. You can use this to speed up which they are listed in the @code{FROM} clause. You can use this to speed up
a query if the optimizer joins the tables in non-optimal order. a query if the optimizer joins the tables in non-optimal order.
...@@ -32621,11 +32625,13 @@ portable across databases, it's recommended to use @code{LEFT JOIN} ...@@ -32621,11 +32625,13 @@ portable across databases, it's recommended to use @code{LEFT JOIN}
instead of @code{RIGHT JOIN}. instead of @code{RIGHT JOIN}.
@item @item
@cindex hints
@code{STRAIGHT_JOIN} is identical to @code{JOIN}, except that the left table @code{STRAIGHT_JOIN} is identical to @code{JOIN}, except that the left table
is always read before the right table. This can be used for those (few) is always read before the right table. This can be used for those (few)
cases where the join optimizer puts the tables in the wrong order. cases where the join optimizer puts the tables in the wrong order.
@item @item
@cindex hints
As of MySQL Version 3.23.12, you can give hints about which As of MySQL Version 3.23.12, you can give hints about which
index MySQL should use when retrieving information from a index MySQL should use when retrieving information from a
table. This is useful if @code{EXPLAIN} shows that MySQL is table. This is useful if @code{EXPLAIN} shows that MySQL is
...@@ -34129,7 +34135,7 @@ The options work for all table types, if not otherwise indicated: ...@@ -34129,7 +34135,7 @@ The options work for all table types, if not otherwise indicated:
@item @code{PACK_KEYS} @tab Set this to 1 if you want to have a smaller index. This usually makes updates slower and reads faster (MyISAM, ISAM). @item @code{PACK_KEYS} @tab Set this to 1 if you want to have a smaller index. This usually makes updates slower and reads faster (MyISAM, ISAM).
@item @code{PASSWORD} @tab Encrypt the @code{.frm} file with a password. This option doesn't do anything in the standard MySQL version. @item @code{PASSWORD} @tab Encrypt the @code{.frm} file with a password. This option doesn't do anything in the standard MySQL version.
@item @code{DELAY_KEY_WRITE} @tab Set this to 1 if want to delay key table updates until the table is closed (MyISAM). @item @code{DELAY_KEY_WRITE} @tab Set this to 1 if want to delay key table updates until the table is closed (MyISAM).
@item @code{ROW_FORMAT} @tab Defines how the rows should be stored. Currently you can only use the DYNAMIC and STATIC options for MyISAM tables. @item @code{ROW_FORMAT} @tab Defines how the rows should be stored. Currently this option only works with MyISAM tables, which supports the @code{DYNAMIC} and @code{FIXED} row formats. @xref{MyISAM table formats}.
@end multitable @end multitable
When you use a @code{MyISAM} table, MySQL uses the product of When you use a @code{MyISAM} table, MySQL uses the product of
...@@ -35649,6 +35655,13 @@ high-byte first. ...@@ -35649,6 +35655,13 @@ high-byte first.
automatically depending on the type of columns you are using. The third, automatically depending on the type of columns you are using. The third,
compressed tables, can only be created with the @code{myisampack} tool. compressed tables, can only be created with the @code{myisampack} tool.
When you @code{CREATE} or @code{ALTER} a table you can for tables that
doesn't have @code{BLOB}'s force the table format to @code{DYNAMIC} or
@code{FIXED} with the @code{ROW_FORMAT=#} table option. In the future
you will be able to compress/decompress tables by specifying
@code{ROW_FORMAT=compressed | default} to @code{ALTER TABLE}.
@xref{CREATE TABLE}.
@menu @menu
* Static format:: Static (Fixed-length) table characteristics * Static format:: Static (Fixed-length) table characteristics
* Dynamic format:: Dynamic table characteristics * Dynamic format:: Dynamic table characteristics
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment