看懂执行计划
例子1
以AdventureWorks的DatabaseLog查询为例:
SELECT * FROM [AdventureWorks2008R2].[dbo].[DatabaseLog]
? Cached plan size – how much memory the plan generated by this query will take up in stored procedure cache. This is a useful number when investigating cache performance issues because you'll be able to see which plans are taking up more memory.
? Estimated Operator Cost – we've already seen this as the percentage cost in Figure 1.
? Estimated Subtree Cost – tells us the accumulated optimizer cost assigned to this step and all previous steps, but remember to read from right to left. This number is meaningless in the real world, but is a mathematical evaluation used by the query optimizer to determine the cost of the operator in question; it represents the amount of time that the optimizer thinks this operator will take.
…… …… 余下全文