8.2.1.1 Speed of SELECT Statements [译]

In general, when you want to make a slow SELECT ... WHERE query faster, the first thing to check is whether you can add an index. Indexes are especially important for queries that reference different tables, using features such as joins and foreign keys. You can use the EXPLAIN statement to determine which indexes are used for a SELECT. See

通常,当你想使得一条较慢的select...where查询更快时,第一件事就是检查是否加了索引。索引对于使用了joins和外键foreign keys之类的查询是非常重要的。你能使用 EXPLAIN 语句检测哪个索引被使用。


你可能感兴趣的:(8.2.1.1 Speed of SELECT Statements [译])