I'm looking through the plan cache, looking for low-hanging optimization fruit and came across this snippet:
Why are many of the costs listed above 100% ? Shouldn't that be impossible?
The visual cost estimator is crap. This sort of stuff happens all the time. Just go with the highest ones are the most expensive and attack those ones first.
I'd been also curious about why sometimes some cost is displayed as 100%, 200%, 300%...and even more. After analyse xml file of query plan, I got it.
The cost percentage = my EstimatedTotalSubtreeCost
/ parent node's EstimatedTotalSubtreeCost
For example, your query plan shows Clustered Index Insert
take cost 914%, to understand how it calculate this percentage,
Clustered Index Insert
to show popup, you can see the cost EstimatedTotalSubtreeCost
, e.g, 0.2COND WITH QUERY
, check the popup to get EstimatedTotalSubtreeCost
, e.g, 0.0218818Clustered Index Insert
popup