2011-02-15 81 views
2
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狀態中找到的RED標記的值......我是一名自學成才的開發人員,所以我不確定如何解決這個問題,或者我的這些值真的很高或什麼...在phpMyAdmin給出的描述並不總是很清楚我...MySql性能醫生:有人可以爲我翻譯這個值嗎?

注:我的網站仍然在升級操作系統存在,除了我的測試中沒有網絡流量

感謝

回答

1

你需要優化你的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. "

相關問題