greigeh
03-19-2015, 03:34 PM
I was recently suspended by my web host as one of my plugins was causing an overloading mySQL, due to the following part:
mysql> use DATABASENAME
Database changed
mysql> explain SELECT DISTINCT `live_dbtech_thanks_entry`.*, `live_user`.`username`, `live_user`.`displaygroupid` FROM `live_dbtech_thanks_entry` JOIN `live_user` ON (`live_user`.`userid` = `live_dbtech_thanks_entry`.`userid`) WHERE `contentid` = '2132714' ;
+----+-------------+--------------------------+--------+----------------+---------+---------+----------------------------------------------+--------+------------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+--------------------------+--------+----------------+---------+---------+----------------------------------------------+--------+------------------------------+
| 1 | SIMPLE | live_dbtech_thanks_entry | ALL | entryid,userid | NULL | NULL | NULL | 726933 | Using where; Using temporary |
| 1 | SIMPLE | live_user | eq_ref | PRIMARY | PRIMARY | 4 | wukohi_forum.live_dbtech_thanks_entry.userid | 1 | |
+----+-------------+--------------------------+--------+----------------+---------+---------+----------------------------------------------+--------+------------------------------+
2 rows in set (0.00 sec)
Is there anyone who would be able to explain what this actually means? I'm not really wise when it comes to mySQL and that sort of side to the forum
mysql> use DATABASENAME
Database changed
mysql> explain SELECT DISTINCT `live_dbtech_thanks_entry`.*, `live_user`.`username`, `live_user`.`displaygroupid` FROM `live_dbtech_thanks_entry` JOIN `live_user` ON (`live_user`.`userid` = `live_dbtech_thanks_entry`.`userid`) WHERE `contentid` = '2132714' ;
+----+-------------+--------------------------+--------+----------------+---------+---------+----------------------------------------------+--------+------------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+--------------------------+--------+----------------+---------+---------+----------------------------------------------+--------+------------------------------+
| 1 | SIMPLE | live_dbtech_thanks_entry | ALL | entryid,userid | NULL | NULL | NULL | 726933 | Using where; Using temporary |
| 1 | SIMPLE | live_user | eq_ref | PRIMARY | PRIMARY | 4 | wukohi_forum.live_dbtech_thanks_entry.userid | 1 | |
+----+-------------+--------------------------+--------+----------------+---------+---------+----------------------------------------------+--------+------------------------------+
2 rows in set (0.00 sec)
Is there anyone who would be able to explain what this actually means? I'm not really wise when it comes to mySQL and that sort of side to the forum