Last active
December 15, 2015 03:29
-
-
Save vladvinnikov/5195196 to your computer and use it in GitHub Desktop.
Mysql indexes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Индексы – допуск к высокой производительности MySQL, их необходимость и важность увеличивается пропорционально росту объема данных в базе. Индексы необходимо создавать для столбцов, по которым: | |
| - происходит поиск в части WHERE | |
| - идет соединение таблиц при JOIN | |
| - выполняется сортировка и группировка записи при GROUP BY и ORDER BY | |
| - осуществляется поиск MIN() и MAX() | |
| Индексы бывают составными, в этом случае очень важен порядок столбцов. | |
| Разбирая вывод EXPLAIN, стоит обратить внимание на столбцы: | |
| - type (значение ALL – bad) | |
| - key (NULL – bad) | |
| - ref (NULL – bad) | |
| - extra (Using filesort, Using temporary, Using where – bad) | |
| http://www.percona.com/doc/percona-xtrabackup/ | |
| http://highload.com.ua/index.php/2009/06/09/%D0%BA%D0%B0%D0%BA-%D0%B2%D1%8B%D0%B1%D1%80%D0%B0%D1%82%D1%8C-%D0%BA%D0%BE%D0%BB%D0%BE%D0%BD%D0%BA%D0%B8-%D0%B4%D0%BB%D1%8F-%D0%B8%D0%BD%D0%B4%D0%B5%D0%BA%D1%81%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment