Rechercher dans le manuel MySQL
13.7.7.5 LOAD INDEX INTO CACHE Syntax
- tbl_index_list [, tbl_index_list] ...
- tbl_index_list:
- tbl_name
- partition_list: {
- partition_name[, partition_name] ...
- | ALL
- }
The LOAD INDEX INTO
CACHE
statement preloads a table index into the key
cache to which it has been assigned by an explicit
CACHE INDEX
statement, or into
the default key cache otherwise.
LOAD INDEX INTO
CACHE
applies only to MyISAM
tables, including partitioned MyISAM
tables.
In addition, indexes on partitioned tables can be preloaded for
one, several, or all partitions.
The IGNORE LEAVES
modifier causes only blocks
for the nonleaf nodes of the index to be preloaded.
IGNORE LEAVES
is also supported for
partitioned MyISAM
tables.
The following statement preloads nodes (index blocks) of indexes
for the tables t1
and t2
:
- +---------+--------------+----------+----------+
- +---------+--------------+----------+----------+
- +---------+--------------+----------+----------+
This statement preloads all index blocks from
t1
. It preloads only blocks for the nonleaf
nodes from t2
.
The syntax of LOAD
INDEX INTO CACHE
enables you to specify that only
particular indexes from a table should be preloaded. However,
the implementation preloads all the table's indexes into the
cache, so there is no reason to specify anything other than the
table name.
It is possible to preload indexes on specific partitions of
partitioned MyISAM
tables. For example, of
the following 2 statements, the first preloads indexes for
partition p0
of a partitioned table
pt
, while the second preloads the indexes for
partitions p1
and p3
of
the same table:
To preload the indexes for all partitions in table
pt
, you can use either of the following two
statements:
The two statements just shown are equivalent, and issuing either
one has exactly the same effect. In other words, if you wish to
preload indexes for all partitions of a partitioned table, the
PARTITION (ALL)
clause is optional.
When preloading indexes for multiple partitions, the partitions need not be contiguous, and you need not list their names in any particular order.
LOAD INDEX INTO
CACHE ... IGNORE LEAVES
fails unless all indexes in a
table have the same block size. To determine index block sizes
for a table, use myisamchk -dv and check the
Blocksize
column.
Traduction non disponible
Le manuel MySQL n'est pas encore traduit en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.
Document créé le 26/06/2006, dernière modification le 26/10/2018
Source du document imprimé : https://www.gaudry.be/mysql-rf-load-index.html
L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.
Références
Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.