Generic placeholder image

apakah ada cara singkat untuk query seperti ini?

Ditanyakan 6 hari yang lalu oleh NUR IMAN

dikarnakan proses load query sedikit memakan waktu, apa ada cara untuk mempersingkat query bisa sedikit pangkat proses load query?

mohon pencerahannya,

SELECT t.id_siswa, nama_siswa, gr.nama_guru AS nama_guru, ck.nama_guru AS nama_checker, siswa.level, (SELECT DISTINCT COUNT(status) FROM tugas AS tg, siswa AS sw WHERE tg.status = '0' AND tg.id_siswa = siswa.id_siswa AND sw.id_siswa = siswa.id_siswa AND tg.level = sw.level AND tg.tgl_sebenarnya >= '$from_date' OR (sw.custom_term_activated != 0 AND tg.tgl_sebenarnya >= 'sw.custom_term_from')) AS jml_upload, siswa.id_cabang, nama_cabang, t.id_tugas FROM tugas AS t, tugas AS u, siswa, cabang_clc, guru AS gr, guru AS ck WHERE t.id_tugas = u.id_tugas AND siswa.id_siswa = t.id_siswa AND (siswa.id_guru = '$data[id_guru]' OR siswa.id_checker = '$data[id_guru]') AND gr.id_guru = siswa.id_guru AND ck.id_guru = siswa.id_checker AND siswa.id_cabang = cabang_clc.id_cabang AND t.level = siswa.level AND u.level = siswa.level AND t.status = 0 AND u.status = 0 AND (t.tgl_sebenarnya >= '$from_date' OR (siswa.custom_term_activated != 0 AND t.tgl_sebenarnya >= 'siswa.custom_term_from')) ORDER BY t.id_tugas ASC

BUAT KOMENTAR