10. Choose an Index
- MySQL supports the syntax of
FORCE INDEXandUSE INDEX - Query optimizer decides which index to use based on # of rows scanned, tmp table, sorting, etc.
- Query optimizer estimates based on catalog data, such as cardinality of a column
innodb_stats_persistentdecides how to build catalog dataANALYSE TABLE tbl_namecould trigger to re-build catalog data