SQL Server - Query Execution Plan For Conditional Statements?

You'll get plan recompiles often with that approach. I generally try to split them up, so you end up with.

You'll get plan recompiles often with that approach. I generally try to split them up, so you end up with: DECLARE @condition BIT IF @condition = 1 BEGIN EXEC MyProc1 END ELSE BEGIN EXEC MyProc2 END This way there's no difference to the end users, and MyProc1 & 2 get their own, proper cached execution plans. One procedure, one query.

Meff (+1) is correct. My previous answer was not (so I've deleted it). – Mitch Wheat Nov 14 '08 at 14:23.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions