random1 Posted July 16, 2012 Share Posted July 16, 2012 I have been developing a database in MySQL using the InnoDB starge engine. I'm trying to iron out slow performing queries I have in my database. My Slow Query Log contains: # Time: 120716 22:27:51 # User@Host: MYUSERNAME[MYUSERNAME] @ localhost [127.0.0.1] # Query_time: 0.002929 Lock_time: 0.002929 Rows_sent: 21 Rows_examined: 21 use webman; SET timestamp=1342441671; SELECT `language_string_id`, `language_string_name`,`language_string_text` FROM `language_korean` ORDER BY `language_string_id`; # User@Host: MYUSERNAME[MYUSERNAME] @ localhost [127.0.0.1] # Query_time: 0.002929 Lock_time: 0.002929 Rows_sent: 19 Rows_examined: 47 SET timestamp=1342441671; SELECT * FROM `view_language_list`; # User@Host: MYUSERNAME[MYUSERNAME] @ localhost [127.0.0.1] # Query_time: 0.000000 Lock_time: 0.000000 Rows_sent: 21 Rows_examined: 21 SET timestamp=1342441671; Both Queries: 1) SELECT `language_string_id`, `language_string_name`,`language_string_text` FROM `language_korean` ORDER BY `language_string_id`; 2) SELECT `language_wms`.`language_id` AS `language_id`,`language_wms`.`language_name` AS `language_name`,`language_wms`.`language_description` AS `language_description`,`language_wms`.`language_text_direction` AS `language_text_direction` from `language_wms` where `language_wms`.`language_status_id` order by `language_wms`.`language_ordering`,`language_wms`.`language_name` I ran EXPLAIN on them and got: 1) id;select_type;table;type;possible_keys;key;key_len;ref;rows;Extra 1;SIMPLE;language_korean;index;;PRIMARY;8;;21; 2) id;select_type;table;type;possible_keys;key;key_len;ref;rows;Extra 1;SIMPLE;language_wms;ALL;;;;;28;Using where; Using filesort Is there a way to speed up these queries and get them out of appearing in the slow query log? Quote Link to comment Share on other sites More sharing options...
fenway Posted July 17, 2012 Share Posted July 17, 2012 What was your slow threshold set to? You're not going to get 21 rows to return any faster. Quote Link to comment Share on other sites More sharing options...
gizmola Posted July 17, 2012 Share Posted July 17, 2012 What was your slow threshold set to? You're not going to get 21 rows to return any faster. My god man, OPTIMIZATION!!!! If he can't shave .0000 off that .0000 I don't know if the interweb will survive. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.