Доктор производительности MySql: кто-то может перевести эти значения для меня? - PullRequest
2 голосов
/ 15 февраля 2011
Slow_queries 11
Select_full_join 13 k
Handler_read_next 203 k
Handler_read_rnd_next 5,174 M
Created_tmp_disk_tables 53 k
Opened_tables 59 k

это значения, помеченные КРАСНЫМИ, которые я нашел в моем статусе mysql ... Я разработчик-самоучка, поэтому я не уверен, как это исправить, или эти значения действительно высоки или что ... дано в phpmyadmin мне не всегда понятно ...

ПРИМЕЧАНИЕ: мой веб-сайт все еще находится в стадии подготовки, кроме моих тестов, нет никакого веб-трафика

спасибо

1 Ответ

1 голос
/ 16 февраля 2011

Вам необходимо оптимизировать запросы MySQL.Чтобы найти медленные запросы, вам нужно регистрировать медленные запросы.вы можете включить из MySQL конфигурационный файл my.cnf

Совет: используйте explain, чтобы сообщить, что MySQL делает с вашим запросом.

вот значение вышеприведенных значений из статуса phpmyadmin:

Slow_queries 11 : "The number of queries that have taken more than long_query_time seconds"

Select_full_join : "The number of joins that do not use indexes. If this value is not 0, you should carefully check the indexes of your tables.

Handler_read_next "The number of requests to read the next row in key order. This is incremented if you are querying an index column with a range constraint or if you are doing an index scan. "

Handler_read_rnd_next : "The number of requests to read the next row in the data file. This is high if you are doing a lot of table scans. Generally this suggests that your tables are not properly indexed or that your queries are not written to take advantage of the indexes you have. "

Created_tmp_disk_tables : "The number of temporary tables on disk created automatically by the server while executing statements. If Created_tmp_disk_tables is big, you may want to increase the tmp_table_size value to cause temporary tables to be memory-based instead of disk-based. "

Opened_tables : "The number of tables that have been opened. If opened tables is big, your table cache value is probably too small. "

...