Guide to SQL performance tunning - UzanR/UzCodingNewLife GitHub Wiki

Keys of SQL performance tunning

Query structure

proper joins

use the appropriate type of join join on indexed columns to improve performance filtering data early in the query avoiding unnecessary subqueries

Indexing

Được tạo trên những columns được dùng thường xuyên để search và sort để làm tăng tốc query

Database configuration

Adjusting memory and bufer pool settings adjusting the settings of the query optimizer configuring the database to use the appropriate storage engine

Partitioning

Partition large table allowing the database to only scan the partitions that are relevant to a given query.

Caching

Caching query results can improve performance by reducing the need to repeatedly run the same query.

Data distribution

Data should be distributed evenly across the storage devices to reduce contention and increase performance.

https://www.percona.com/blog/explain-extended-can-tell-you-all-kinds-of-interesting-things/