MySQueaL Resources

resources for mysql admins and developers who are squealing for help

More Resources

Main Doc Pages
Comments
MySQL columns: everywhere I look are tables and columns; life is filled with databases of information to be ordered and grouped. (Milan, Italy)

LOAD INDEX INTO CACHE Statement

Use this MySQL statement to preload a table's index into a given key cache for a MyISAM table.

hits past month: 8 ;  last updated: may 4, 2009 - 2:34am ;  parent: Other MySQL Statements & Functions

Syntax

LOAD INDEX INTO CACHE
  table [[INDEX|KEY] (index[,  . . . )] [IGNORE LEAVES]
  [,  . . . ]

Explanation

Use this MySQL statement to preload a MySQL table's index into a given key cache for a MyISAM table. The syntax allows one or more indexes to be specified in a comma-separated list in parentheses, in order to preload just the specified indexes, but presently MySQL simply loads all the indexes for the MySQL table into the cache. The keywords INDEX and KEY are interchangeable and optional; they do not affect the results. The IGNORE LEAVES clause instructs MySQL not to preload leaf nodes of the index.

Examples

Here is an example of how you can use this MySQL statement:

LOAD INDEX INTO CACHE workreq;

+----------------------+--------------+----------+----------+
| Table                | Op           | Msg_type | Msg_text |
+----------------------+--------------+----------+----------+
| workrequests.workreq | preload_keys | status   | OK       |
+----------------------+--------------+----------+----------+
Return to Other MySQL Statements & Functions page of our MySQL Documentation