Shawn Taylor Wrote:
-------------------------------------------------------
> I think your syntax is a little off. Try this:
>
>
>
> -- create 512 MB index cache
> SET GLOBAL my_keys.key_buffer_size=512*1048576;
>
> -- Assign the tables indexes to the named cache
> --
>
http://dev.mysql.com/doc/refman/5.0/en/cache-index
> .html
> CACHE INDEX my_table IN my_keys;
>
> -- Preload the indexes into the cache
> LOAD INDEX INTO CACHE my_table;
>
>
> You only need to provide tables to these commands.
> It will put the indexes (from those tables) into
> the named caches. All other indexes will get
> cached into the default cache.
Hi Shawn,
If a table has one huge index that doesn't need to be cached and another small one that does and you want to preload the small index but not the big one then the syntax explicitly naming the indexes to be cached seems would surely be the right one.
Look at the syntax definition in the manual:
http://dev.mysql.com/doc/refman/5.0/en/cache-index.html It says you can specify each individual index you want to assign to the cache, as does the syntax definition for LOAD INDEX INTO CACHE:
http://dev.mysql.com/doc/refman/5.0/en/load-index.html
The manual appears to allow me to assign individual indexes as opposed to all of a table's indexes to a named key buffer. But I suspect mysqld ignores the individual index names.