I'm looking at a stored procedure that takes some XML from a web app and creates a SQL search with it. There are 11 variables but the execution plan says that this one line takes 68% of the whole execution time. The 68% is the cost relative to the batch. There are other similar
@input.value processes that register as 0%, though the execution plan for this is more complex.
Can anyone tell me why or suggest a more efficient way of writing it?
SET @Message=@Input.value('(/Input/Message)[not(@xsi:nil = "true")]', 'int')