Q1
True / FalseIn MySQL, cardinality refers to the uniqueness of data values in a column.
Cardinality is a measure of the number of distinct values in a column, indicating the uniqueness of the data.
Q2
True / FalseHigh cardinality in MySQL means a column has a large number of duplicate values.
High cardinality means a column has many unique values, while low cardinality means it has many duplicate values.
Q3
True / FalseThe SHOW INDEX command in MySQL can display cardinality information for an index.
The SHOW INDEX command includes cardinality as part of the output, showing the number of unique values in the index.
Q4
True / FalseIn MySQL, a column with low cardinality is ideal for indexing.
Columns with high cardinality are generally better suited for indexing because they have more unique values, making the index more efficient.
Q5
True / FalseCardinality in MySQL can be affected by the presence of NULL values in a column.
: NULL values are considered distinct values, so their presence can affect the cardinality of a column.
Q6
True / FalseThe cardinality of an index in MySQL can change over time as data is inserted, updated, or deleted.
As the data in a table changes, the number of unique values in the indexed columns can change, affecting the cardinality.
Q7
True / FalseMySQL automatically updates the cardinality of an index in real-time as data is modified.
MySQL does not always update the cardinality in real-time; it is often updated during operations like ANALYZE TABLE.
Q8
True / FalseCardinality estimates in MySQL can be inaccurate, leading to suboptimal query plans.
Inaccurate cardinality estimates can cause the MySQL optimizer to choose less efficient query execution plans.
Q9
True / FalseThe InnoDB storage engine in MySQL uses cardinality estimates to determine whether to use a table scan or an index scan.
The MySQL optimizer, including the InnoDB storage engine, uses cardinality estimates to decide the most efficient way to execute a query.
Q10
True / FalseTo improve query performance in MySQL, it is always necessary to maintain high cardinality for all columns.
Maintaining high cardinality is important for indexed columns but not necessarily for all columns. Some columns, like status flags, naturally have low cardinality and do not need high uniqueness to function efficiently.