2

I know that a single batch can have more than one query plan but want to learn some more about the cases when more than one execution plans are generated. Is it because of a batch length or the use of some statements? Is there maximum limit for query plans for a single batch?

Thanks

3

Each query in the batch needs a plan. And furthermore, each procedural function (scalar function or multi statement table valued function) in the batch needs a plan too, which is often less obvious.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.