- Kolom-kolom dalam klausa WHERE pastikan ter-index
- Tabel-tabel yang terlibat operasi JOIN, harus dipastikan memiliki collation yang sama
Contoh :
EXPLAIN select p.nomor from peserta p LEFT JOIN esai e ON p.nomor=e.nomor WHERE substr(p.nomor_sekunder, 7, 2) IN ('01', '02', '03') AND p.is_hadir_kd=1 AND e.nomor IS NULL ;
Jika di Extra terdapat Using join buffer (Block Nested Loop) seperti dibawah,
silahkan baca [1]
Referensi
- MySQL - how to add “Using join buffer (Block Nested Loop)” to a query?, https://stackoverflow.com/questions/34375065/mysql-how-to-add-using-join-buffer-block-nested-loop-to-a-query