阅读背景:

直接执行语句和从存储过程执行不同的执行计划

来源:互联网 

While developing a new query at work I wrote it and profiled it in SQL Query Analyzer. The query was performing really good without any table scans but when I encapsulated it within a stored procedure the performance was horrible. When I looked at the execution plan I could see that SQL Server picked a different plan that used a table scan instead of an index seek on TableB (I've been forced to obfuscate the table and column names a bit but none of the query logic has changed).While developing a new query at work I wrote it




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: