Have few consistently slow performing queries but not sure from where it's generated. Any thoughts for making it faster would be helpful.
Running MySQL 5.7.x with Redis.
# Time: 2024-04-22T07:56:51.886625Z
# User@Host: ips_user[ips_user] @ localhost [] Id: 32607188
# Query_time: 6.290145 Lock_time: 0.000050 Rows_sent: 1 Rows_examined: 1126912
SET timestamp=1713772611;
/*test_table::ips_user::IPS\Content\Search\_Results::count:769*/ SELECT COUNT(*) FROM `ipb_core_search_index` AS `main` WHERE ( ( index_class IN('IPS\\core\\Statuses\\Status','IPS\\core\\Statuses\\Reply') ) OR index_class='IPS\\cms\\Pages\\PageItem' OR ( index_class IN('IPS\\cms\\Records1','IPS\\cms\\Records\\Comment1','IPS\\cms\\Records\\Review1') ) OR ( index_class IN('IPS\\cms\\Records2','IPS\\cms\\Records\\Comment2','IPS\\cms\\Records\\Review2') ) OR index_class='IPS\\forums\\Topic\\Post' OR ( index_class IN('IPS\\calendar\\Event','IPS\\calendar\\Event\\Comment','IPS\\calendar\\Event\\Review') ) OR ( index_class IN('IPS\\gallery\\Image','IPS\\gallery\\Image\\Comment','IPS\\gallery\\Image\\Review') ) OR ( index_class IN('IPS\\gallery\\Album\\Item','IPS\\gallery\\Album\\Comment','IPS\\gallery\\Album\\Review') ) OR ( index_class IN('IPS\\nexus\\Package\\Item','IPS\\nexus\\Package\\Review') ) OR ( index_class IN('IPS\\blog\\Entry','IPS\\blog\\Entry\\Comment') ) OR ( index_class IN('IPS\\downloads\\File','IPS\\downloads\\File\\Comment','IPS\\downloads\\File\\Review') ) OR ( index_class IN('IPS\\quizzes\\Quiz','IPS\\quizzes\\Quiz\\Comment','IPS\\quizzes\\Quiz\\Review') ) OR ( index_class IN('IPS\\communitymap\\Markers','IPS\\communitymap\\Markers\\Comment','IPS\\communitymap\\Markers\\Review') ) ) AND ( index_content LIKE '%{query}\'and(select+1)>0waitfor/**/delay\'0:0:0%' or index_title LIKE '%{query}\'and(select+1)>0waitfor/**/delay\'0:0:0%' ) AND ( index_permissions = '*' OR ( FIND_IN_SET(2,index_permissions) ) ) AND index_hidden=0;
# Time: 2024-04-22T07:56:59.448524Z
# User@Host: ips_user[ips_user] @ localhost [] Id: 32608155
# Query_time: 6.962464 Lock_time: 0.000078 Rows_sent: 0 Rows_examined: 1126912
SET timestamp=1713772619;
/*test_table::ips_user::IPS\Content\Search\Mysql\_Query::search:761*/ SELECT main.*, ((( index_title LIKE '%{query}\'/**/and/**/DBMS_PIPE.RECEIVE_MESSAGE(\'c\',0)=\'c%' ) AND MATCH(index_title) AGAINST ('' IN BOOLEAN MODE)*5)+(( index_content LIKE '%{query}\'/**/and/**/DBMS_PIPE.RECEIVE_MESSAGE(\'c\',0)=\'c%' or index_title LIKE '%{query}\'/**/and/**/DBMS_PIPE.RECEIVE_MESSAGE(\'c\',0)=\'c%' ) AND MATCH(index_content,index_title) AGAINST ('' IN BOOLEAN MODE)))/POWER(( ( UNIX_TIMESTAMP( NOW() ) - ( CASE WHEN index_date_updated <= UNIX_TIMESTAMP( NOW() ) THEN index_date_updated ELSE 0 END )) / 3600 ) + 2,1.5) AS calcscore FROM `ipb_core_search_index` AS `main` WHERE ( ( index_class IN('IPS\\core\\Statuses\\Status','IPS\\core\\Statuses\\Reply') ) OR index_class='IPS\\cms\\Pages\\PageItem' OR ( index_class IN('IPS\\cms\\Records1','IPS\\cms\\Records\\Comment1','IPS\\cms\\Records\\Review1') ) OR ( index_class IN('IPS\\cms\\Records2','IPS\\cms\\Records\\Comment2','IPS\\cms\\Records\\Review2') ) OR index_class='IPS\\forums\\Topic\\Post' OR ( index_class IN('IPS\\calendar\\Event','IPS\\calendar\\Event\\Comment','IPS\\calendar\\Event\\Review') ) OR ( index_class IN('IPS\\gallery\\Image','IPS\\gallery\\Image\\Comment','IPS\\gallery\\Image\\Review') ) OR ( index_class IN('IPS\\gallery\\Album\\Item','IPS\\gallery\\Album\\Comment','IPS\\gallery\\Album\\Review') ) OR ( index_class IN('IPS\\nexus\\Package\\Item','IPS\\nexus\\Package\\Review') ) OR ( index_class IN('IPS\\blog\\Entry','IPS\\blog\\Entry\\Comment') ) OR ( index_class IN('IPS\\downloads\\File','IPS\\downloads\\File\\Comment','IPS\\downloads\\File\\Review') ) OR ( index_class IN('IPS\\quizzes\\Quiz','IPS\\quizzes\\Quiz\\Comment','IPS\\quizzes\\Quiz\\Review') ) OR ( index_class IN('IPS\\communitymap\\Markers','IPS\\communitymap\\Markers\\Comment','IPS\\communitymap\\Markers\\Review') ) ) AND ( index_content LIKE '%{query}\'/**/and/**/DBMS_PIPE.RECEIVE_MESSAGE(\'c\',0)=\'c%' or index_title LIKE '%{query}\'/**/and/**/DBMS_PIPE.RECEIVE_MESSAGE(\'c\',0)=\'c%' ) AND ( index_permissions = '*' OR ( FIND_IN_SET(2,index_permissions) ) ) AND index_hidden=0 ORDER BY calcscore DESC LIMIT 0,25;
# Time: 2024-04-22T07:57:06.499082Z
# User@Host: ips_user[ips_user] @ localhost [] Id: 32608155
# Query_time: 7.050252 Lock_time: 0.000051 Rows_sent: 1 Rows_examined: 1126912
SET timestamp=1713772626;
/*test_table::ips_user::IPS\Content\Search\_Results::count:769*/ SELECT COUNT(*) FROM `ipb_core_search_index` AS `main` WHERE ( ( index_class IN('IPS\\core\\Statuses\\Status','IPS\\core\\Statuses\\Reply') ) OR index_class='IPS\\cms\\Pages\\PageItem' OR ( index_class IN('IPS\\cms\\Records1','IPS\\cms\\Records\\Comment1','IPS\\cms\\Records\\Review1') ) OR ( index_class IN('IPS\\cms\\Records2','IPS\\cms\\Records\\Comment2','IPS\\cms\\Records\\Review2') ) OR index_class='IPS\\forums\\Topic\\Post' OR ( index_class IN('IPS\\calendar\\Event','IPS\\calendar\\Event\\Comment','IPS\\calendar\\Event\\Review') ) OR ( index_class IN('IPS\\gallery\\Image','IPS\\gallery\\Image\\Comment','IPS\\gallery\\Image\\Review') ) OR ( index_class IN('IPS\\gallery\\Album\\Item','IPS\\gallery\\Album\\Comment','IPS\\gallery\\Album\\Review') ) OR ( index_class IN('IPS\\nexus\\Package\\Item','IPS\\nexus\\Package\\Review') ) OR ( index_class IN('IPS\\blog\\Entry','IPS\\blog\\Entry\\Comment') ) OR ( index_class IN('IPS\\downloads\\File','IPS\\downloads\\File\\Comment','IPS\\downloads\\File\\Review') ) OR ( index_class IN('IPS\\quizzes\\Quiz','IPS\\quizzes\\Quiz\\Comment','IPS\\quizzes\\Quiz\\Review') ) OR ( index_class IN('IPS\\communitymap\\Markers','IPS\\communitymap\\Markers\\Comment','IPS\\communitymap\\Markers\\Review') ) ) AND ( index_content LIKE '%{query}\'/**/and/**/DBMS_PIPE.RECEIVE_MESSAGE(\'c\',0)=\'c%' or index_title LIKE '%{query}\'/**/and/**/DBMS_PIPE.RECEIVE_MESSAGE(\'c\',0)=\'c%' ) AND ( index_permissions = '*' OR ( FIND_IN_SET(2,index_permissions) ) ) AND index_hidden=0;
# Time: 2024-04-24T21:41:37.196599Z
# User@Host: ips_user[ips_user] @ localhost [] Id: 34042420
# Query_time: 5.170450 Lock_time: 0.000017 Rows_sent: 500 Rows_examined: 1926224
SET timestamp=1713994897;
/*test_table::ips_user::IPS\core\modules\front\discover\_popular::leaderboard:70*/ SELECT class_type_id_hash, total_rep FROM ( SELECT class_type_id_hash, SUM(rep_rating) as total_rep FROM `ipb_core_reputation_index` AS `x` WHERE rep_date BETWEEN 1253102970 AND 1713994892 AND rep_class='IPS\\forums\\Topic\\Post' GROUP BY `class_type_id_hash` ) AS `x` ORDER BY x.total_rep desc LIMIT 0,500;
# Time: 2024-06-03T12:52:20.369823Z
# User@Host: ips_user[ips_user] @ localhost [] Id: 57314593
# Query_time: 5.582759 Lock_time: 0.000205 Rows_sent: 25 Rows_examined: 56926
SET timestamp=1717419140;
/*test_table::ips_user::IPS\Helpers\Table\_Content::getRows:504*/ SELECT forums_topics.*, author.*, last_commenter.*, core_tags_cache.tag_cache_text FROM `ipb_forums_topics` AS `forums_topics` LEFT JOIN `ipb_forums_forums` AS `forums_forums` ON forums_topics.forum_id=forums_forums.id LEFT JOIN `ipb_core_tags_cache` AS `core_tags_cache` ON tag_cache_key=MD5(CONCAT('forums;forums;',forums_topics.tid)) LEFT JOIN `ipb_core_members` AS `author` ON author.member_id = forums_topics.starter_id LEFT JOIN `ipb_core_members` AS `last_commenter` ON last_commenter.member_id = forums_topics.last_poster_id WHERE forums_forums.can_view_others=1 AND forums_topics.approved=1 AND forums_topics.approved!=-2 AND forums_topics.approved!=-3 AND forums_topics.is_future_entry=0 AND ( NULLIF(forums_topics.moved_to, '') IS NULL ) AND forums_topics.forum_id IN(124,125,133,134,135,210) ORDER BY forums_topics.pinned DESC, forums_topics.last_post desc LIMIT 4125,25;
# Time: 2024-06-03T13:24:03.947946Z
# User@Host: ips_user[ips_user] @ localhost [] Id: 57385357
# Query_time: 5.179081 Lock_time: 0.000166 Rows_sent: 25 Rows_examined: 55576
SET timestamp=1717421043;
/*test_table::ips_user::IPS\Helpers\Table\_Content::getRows:504*/ SELECT forums_topics.*, author.*, last_commenter.*, core_tags_cache.tag_cache_text FROM `ipb_forums_topics` AS `forums_topics` LEFT JOIN `ipb_forums_forums` AS `forums_forums` ON forums_topics.forum_id=forums_forums.id LEFT JOIN `ipb_core_tags_cache` AS `core_tags_cache` ON tag_cache_key=MD5(CONCAT('forums;forums;',forums_topics.tid)) LEFT JOIN `ipb_core_members` AS `author` ON author.member_id = forums_topics.starter_id LEFT JOIN `ipb_core_members` AS `last_commenter` ON last_commenter.member_id = forums_topics.last_poster_id WHERE forums_forums.can_view_others=1 AND forums_topics.approved=1 AND forums_topics.approved!=-2 AND forums_topics.approved!=-3 AND forums_topics.is_future_entry=0 AND ( NULLIF(forums_topics.moved_to, '') IS NULL ) AND forums_topics.forum_id IN(124,125,133,134,135,210) ORDER BY forums_topics.pinned DESC, forums_topics.last_post desc LIMIT 2775,25;