Hello!
Troubles again. Now my community is down because Error 502 and 504.
Hosting support says it is because very hard queries to MySQL like it:
SELECT main.* FROM `ibf_core_search_index` AS `main` FORCE INDEX(`index_date_updated`) WHERE ( ( index_class IN('IPS\\core\\Statuses\\Status','IPS\\core\\Statuses\\Reply') ) OR index_class='IPS\\forums\\Topic\\Post' OR ( index_class IN('IPS\\calendar\\Event','IPS\\calendar\\Event\\Comment','IPS\\calendar\\Event\\Review') ) ) AND ( ( ( index_class IN('IPS\\core\\Statuses\\Status','IPS\\core\\Statuses\\Reply') ) AND index_is_last_comment=1 ) OR ( index_class='IPS\\forums\\Topic\\Post' AND index_is_last_comment=1 ) OR ( ( index_class IN('IPS\\calendar\\Event','IPS\\calendar\\Event\\Comment') ) AND index_is_last_comment=1 ) ) AND ( index_permissions = '*' OR ( ( FIND_IN_SET(9,index_permissions) OR FIND_IN_SET('m14842',index_permissions) ) ) ) AND index_hidden=0 AND CONCAT(index_item_id,index_class) IN(SELECT DISTINCT CONCAT(index_item_id,index_class) FROM `ibf_core_search_index` AS `sub` WHERE index_author=14842) ORDER BY index_date_updated DESC LIMIT 0,25 +----+--------------------+-------+-------+---------------+--------------------+---------+-------+-------+------------------------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+--------------------+-------+-------+---------------+--------------------+---------+-------+-------+------------------------------+ | 1 | PRIMARY | main | index | NULL | index_date_updated | 5 | NULL | 25 | Using where | | 2 | DEPENDENT SUBQUERY | sub | ref | author_lookup | author_lookup | 4 | const | 12521 | Using where; Using temporary | +----+--------------------+-------+-------+---------------+--------------------+---------+-------+-------+------------------------------+ 2 rows in set (2 min 54.08 sec)
It lasts about 1 min, and other queries not run in this time.
Support says I must "optimize queries" and change tablet type to InnoDB.
What can I do now?