Assuming you want to add an index on the isofficial column, which of the following statements are true?

Assuming you want to add an index on the isofficial column, which of the following statements are true?

Assuming you want to add an index on the isofficial column, which of the following statements are true?

A.
A SELECT query with WHERE lsOfficial=’T’ will perform much faster with the index because there aren’t many rows with that value.

B.
A SELECT query with WHERE IsOfficial-`F’ will perform much faster with the index because there are many rows with that value.

C.
A SELECT query with a WHERE condition on the IsOfficial column won’t perform much faster because there are only few distinct values.

D.
Each UPDATE or INSERT statement will take longer because the additional index needs to be maintained.

E.
You cannot add an index on ENUM columns.

Explanation:
Very Few Distinct Values as T and F are 50-50. It is quicker for MySQL to scan the whole table, and not bother with index values.



Leave a Reply 0

Your email address will not be published. Required fields are marked *