Select a.cg_barCode,a.cg_name,a.mg_uprice,a.mg_ucost from Gpinfo a left join (OpenQuery(YULE,'Select cg_barcode from Gpinfo')) b on a.cg_barCode = b.cg_barcode and a.cg_barCode is null
Select a.cg_barCode,a.cg_name,a.mg_uprice,a.mg_ucost from Gpinfo a left join (OpenQuery(YULE,'Select cg_barcode from Gpinfo')) b on a.cg_barCode = b.cg_barcode where a.cg_barCode is null
Select a.cg_barCode cg_barCode ,a.cg_name,a.mg_uprice,a.mg_ucost from Gpinfo a left join (OpenQuery(YULE,'Select cg_barcode from Gpinfo')) b on a.cg_barCode = b.cg_barcode where cg_barCode is null
我用了3种方法,分别是NOT IN,INNER JOIN,NOT EXISTS NOT IN 执行速度最慢,服务器累计等待时间最小 NOT EXISTS比INNER JOIN稍微快点点,但是服务器累计等待时间最长,客户端执行时间最短 By the Way,谁能给我讲一下,怎么在查询分析器里的执行计划的成本分析里看查询的效率
b on a.cg_barCode = b.cg_barcode and a.cg_barCode is null
b on a.cg_barCode = b.cg_barcode where a.cg_barCode is null
b on a.cg_barCode = b.cg_barcode where cg_barCode is null
NOT IN 执行速度最慢,服务器累计等待时间最小
NOT EXISTS比INNER JOIN稍微快点点,但是服务器累计等待时间最长,客户端执行时间最短
By the Way,谁能给我讲一下,怎么在查询分析器里的执行计划的成本分析里看查询的效率