Topic: MySQL explain
Hello started to understand indexes and there was a question why when I use EXPLAIN in request of a type:
EXPLAIN SELECT * FROM customer LEFT JOIN orders on customer.id = orders.customer_id
, That as a result in a column key is displayed that has not been involved any key.
When I take the same request and I enumerate columns hands, including customer.id (Primary Key) as a result I see key usage.
Such questions at me still arose:
1. Indexes should be applied only on columns used in order by, group by and filtrations (Where), what into the account having, it after all the same where practically?
2. Whether will fulfill an index if at me for example in a filtration complex expression, we tell not simply a date column, and to it functions etc. if is not present as then it to optimize are applied still?