8.2.1.23 Avoiding Full Table Scans避免全表扫描

The output from EXPLAIN shows ALL in the type column when MySQL uses a full table scan to resolve a query. 当MySQL使用完整表扫描来解析查询时,EXPLAIN的输出在type列中显示ALLThis usually happens under the following conditions:这通常在以下情况下发生:

For small tables, a table scan often is appropriate and the performance impact is negligible. 对于小表,表扫描通常是合适的,并且对性能的影响可以忽略不计。For large tables, try the following techniques to avoid having the optimizer incorrectly choose a table scan:请使用以下技术来避免不正确地扫描大型表: