what is the basis of a plan being included in a plan cache.?
suppose i want to know the number of times a query was executed, so i will get the entry in the plan cache for that query.
But i have read that many queries can use a single plan. So how will i know the number of times the query is executed using the plan because the same plan might have been used by some other query, so the plan will give the combined execution count of both
And, i have read that the query plans are based on the cost. So what is the basis for the cost of the plan. I mean, when does two different queries use the same plan?. can two queries fired on two different tables use the same plan?
View Complete Post