您的位置:首页 > 数据库

SQL效率问题,inner join效率有时不高哦

2012-03-13 11:40 183 查看
今天试了一下,有时候用inner join效率不高啊。(1)inner join方式:用时19秒
select p.PROBLEMID  ,pe.Times
from problem p
left join ProblemExt pe on p.problemid=pe.problemid
(2)字段用子查询方式:用时11秒
select p.PROBLEMID,(select times from ProblemExt where problemid=p.problemid)from problem p
差距啊!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: