⬆️ ⬇️

MySQL optimization

It's no secret that working with a database takes up most of the work of almost any site. And it is the work with the database that most often is the bottleneck of web applications.

In this article I would like to give practical advice on the use of MySQL.

Immediately make a reservation:



Problems using MySQL can be divided into the following three groups (in order of importance):

  1. Non-use or misuse of indexes.
  2. Incorrect database structure.
  3. Incorrect \ non-optimal SQL queries.


Let us dwell on each of these groups in more detail.



The use of indexes.

Non-use or misuse of indexes is what most often slows down queries. For those who are not familiar with the mechanism of the index or have not read about it in the manual, I strongly advise you to read .

Tips for using indexes:



DB structure.

Competently designed database - a pledge of fast and efficient work with the base. On the other hand, a badly designed database is always a headache for developers.

Database Design Tips:

SQL queries.







')

Source: https://habr.com/ru/post/20246/



All Articles