How does MySQL use indexes in the select statement to define an index for a column (name: column_a, and the element is table_a in the table ); when I search for column_a, the general method selectcolumn_afromtable_awhere is used as the conditional expression. how can I use the index index_a? ------ Solution -------------------- I have no idea how to use indexes in select
Define an index (name: index_a) for a column (name: column_a, and the element in the table is table_a );
The general method is used when I search column_a.
Select column_a from table_a where condition expression;
So how should I use index_a?
------ Solution --------------------
I didn't understand the index. I created the index for the query performance when the data volume is large,
Generally, the query condition with column_a after the where clause is acceptable, which is much faster than the search without creating an index. it can be seen when a certain amount of data is used.
------ Solution --------------------
Explain your SQL statement and check whether the index is used in the key field.
------ Solution --------------------
Check what your where condition is.
Explain select column_a from table_a where condition expression;
Check whether the index is used.