以下のコードで EXPLAIN を正確に使用する場所と、このコードを高速化/最適化する方法を提案できますか (jobseeker テーブルと jos_users テーブルの 400 万行の場合)
$query = " SELECT DISTINCT a.*,b.name,dl.id id_deg,dl.degree_level,
(SELECT r.hits FROM #__jbjobs_resume_view r WHERE r.jseeker_id=a.user_id AND r.employer_id=$user->id) AS hits,
(SELECT featured FROM #__jbjobs_resume WHERE is_active='y' AND featured=1 AND featured_expire > NOW() AND jseeker_id=a.user_id) as featuredres FROM #__jbjobs_jobseeker a".
" LEFT JOIN #__users b ON a.user_id=b.id ".
" LEFT JOIN #__jbjobs_degree_level dl ON a.id_degree_level = dl.id".
" LEFT JOIN #__jbjobs_custom_field_value c ON c.userid=a.user_id".
" WHERE ".$where."AND b.block='0'".
" ORDER BY featuredres DESC";