在查询分析器里,查看Query 的 Display Estimated Exceution Plan Ctrl+L ,Show exection Plan Ctrl+K,

set SHOWPLAN_TEXT on
go
select * from stock_detail inner join barcode_master on stock_detail.barcode=barcode_master.barcode
where style1 in(1,3)

select * from stock_detail inner join barcode_master on stock_detail.barcode=barcode_master.barcode
where
exists (select style_code from style1 where style_code in(1,3) and barcode_master.style1=style1.style_code )
go

set FORCEPLAN on
select * from stock_detail inner join barcode_master on stock_detail.barcode=barcode_master.barcode
where style1 in(1,3)

select * from stock_detail inner join barcode_master on stock_detail.barcode=barcode_master.barcode
where
exists (select style_code from style1 where style_code in(1,3) and barcode_master.style1=style1.style_code )
set FORCEPLAN off

antony
:antony1029@163.com
:http://antony1029.cnblogs.com
posted on 2006-11-21 10:45 antony.net 阅读(343) 评论(0)  编辑 收藏

标题  
姓名  
主页
Email (只有博主才能看到) 
验证码 *  看不清,换一张 [登录][注册]
内容(请不要发表任何与政治相关的内容)  
  登录  使用高级评论  新用户注册  返回页首  恢复上次提交      


相关链接: