How to use indexes in Mysql in conjunction with PHP

Throw good links, otherwise I googled, read, did not understand nifiga how to use them correctly.
Thanks in advance

Answer 1, authority 100%

Direct use and creation of indexes is not the task of the application – you don’t need to write something special in PHP code to work with them. Indexes are designed to improve database performance when executing queries that include in the condition the field on which the index was created (this is roughly speaking, for more details see MySQL documentation, for example). Those. you look at the application, look at the logs, look for slow and frequent queries, and create the appropriate indexes. The application does not know if there are indexes or not – the database uses them. For articles – look for “when to use indexes”, here, for example, the first article.

Answer 2, authority 67%

Good article about choosing columns for indexing: How to choose columns to index in MySQL