Vidyalelo
MySQL · Q877

MySQL

Programming · MySQL · question 877

Q877

What sets the association between one or more MyISAM tables and the named key cache?

A.
BEGIN
B.
CACHE INDEX
Answer
C.
ALTER DATABASE
D.
ALTER EVENT

Answer: Option B

Solution

Answer: Option B
Solution:
This question asks about how you tell MySQL which key cache to use for a MyISAM table. Key caches are used to store information about your tables' indexes, speeding up data access.

Let's break down the options:
Option A: BEGIN
This is used to start a transaction in MySQL, not for setting key caches.
Option B: CACHE INDEX
This is the correct answer! The CACHE INDEX command is used to explicitly set the key cache for a MyISAM table.
Option C: ALTER DATABASE
This is used to modify the structure of a database itself, not individual table settings like key caches.
Option D: ALTER EVENT
This is used to modify scheduled events within MySQL, unrelated to key caches.

In summary, the correct answer is Option B: CACHE INDEX.