# Query_time: 0 Lock_time: 0 Rows_sent: 0 Rows_examined: 6
SELECT bi.id_ban, bi.email_address, bi.id_member, bg.cannot_access, bg.cannot_register,
bg.cannot_post, bg.cannot_login, bg.reason, IFNULL(bg.expire_time, 0) AS expire_time
FROM f_ban_items AS bi
INNER JOIN f_ban_groups AS bg ON (bg.id_ban_group = bi.id_ban_group AND (bg.expire_time IS NULL OR bg.expire_time > 1358426900))
WHERE
(((119 BETWEEN bi.ip_low1 AND bi.ip_high1)
AND (235 BETWEEN bi.ip_low2 AND bi.ip_high2)
AND (54 BETWEEN bi.ip_low3 AND bi.ip_high3)
AND (120 BETWEEN bi.ip_low4 AND bi.ip_high4)) OR ('119.235.54.120' LIKE bi.hostname) OR ((119 BETWEEN bi.ip_low1 AND bi.ip_high1)
AND (235 BETWEEN bi.ip_low2 AND bi.ip_high2)
AND (54 BETWEEN bi.ip_low3 AND bi.ip_high3)
AND (120 BETWEEN bi.ip_low4 AND bi.ip_high4)) OR ('119.235.54.120' LIKE bi.hostname));
Explain output:
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE bg ALL PRIMARY 6 Using where
1 SIMPLE bi ALL id_ban_group 9 Using where