有興趣可以google 延遲關聯,唔知英文係咩
當lihkgid 同 gender 有index
mysql 咁寫會快啲
如果直接select * where gender = "小妹"
index advantage 會細咗
咁會快啲
select * from user
inner join {
select lihkgid from user
where gender = "小妹" limit 1000000
} tmp
on user.lihkgid = tmp.lihkgid
其實係咪常識嚟