summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorarjen@co3064164-a.bitbike.com <>2002-02-15 12:53:10 +1000
committerarjen@co3064164-a.bitbike.com <>2002-02-15 12:53:10 +1000
commit0b3ab589dc4534d9b842e2844253ea3559055126 (patch)
treeeae258bf3eb86d9d32d89ba3afdeb76608937005
parent45c0222032b5d4b85d8287f15ccc4278f80f7edc (diff)
downloadmariadb-git-0b3ab589dc4534d9b842e2844253ea3559055126.tar.gz
Improved USE INDEX / IGNORE INDEX info.
-rw-r--r--Docs/manual.texi13
1 files changed, 13 insertions, 0 deletions
diff --git a/Docs/manual.texi b/Docs/manual.texi
index 2e78af44557..1aed3ac6868 100644
--- a/Docs/manual.texi
+++ b/Docs/manual.texi
@@ -24779,6 +24779,8 @@ and check the query with @code{EXPLAIN} again. @xref{ALTER TABLE}.
To see what indexes a table has, use @code{SHOW INDEX FROM tbl_name}.
@item key
+@findex USE INDEX
+@findex IGNORE INDEX
The @code{key} column indicates the key that MySQL actually
decided to use. The key is @code{NULL} if no index was chosen. If
MySQL chooses the wrong index, you can probably force
@@ -32810,6 +32812,13 @@ because the column value may not yet be determined when the
The @code{FROM table_references} clause indicates the tables from which to
retrieve rows. If you name more than one table, you are performing a
join. For information on join syntax, see @ref{JOIN, , @code{JOIN}}.
+For each table specified, you may optionally specify an alias, as well as
+make a suggestion to the optimiser what index to use or ignore.
+@findex USE INDEX
+@findex IGNORE INDEX
+@example
+table_name [[AS] alias] [USE INDEX (key_list)] [IGNORE INDEX (key_list)]
+@end example
@item
You can refer to a column as @code{col_name}, @code{tbl_name.col_name}, or
@@ -33099,6 +33108,8 @@ table_reference NATURAL [RIGHT [OUTER]] JOIN table_reference
@end example
Where @code{table_reference} is defined as:
+@findex USE INDEX
+@findex IGNORE INDEX
@example
table_name [[AS] alias] [USE INDEX (key_list)] [IGNORE INDEX (key_list)]
@end example
@@ -33194,6 +33205,8 @@ cases where the join optimiser puts the tables in the wrong order.
@item
@cindex hints
+@findex USE INDEX
+@findex IGNORE INDEX
As of MySQL Version 3.23.12, you can give hints about which
index MySQL should use when retrieving information from a
table. This is useful if @code{EXPLAIN} shows that MySQL is