antony--异域空间
性格左右命运,气度影响格局!


在查询分析器里,查看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

posted on 2006-11-21 10:45  antony.net  阅读(559)  评论(0编辑  收藏  举报