title: SQL Performance with varchar(max) parameters
body: <p>I have two varchar(max) parameters in a SQL Stored Procedure.
  One of which is a readable string generated in C# that is provided to the user to display what values for a particular record have changed.
  The other, is an XML representation of the string, which I am parsing through and adding to a DB Table a record for each of the Modified values.  </p>
  
  <p>To make a long explanation short, the readable string contains user friendly values of the DB columns that the user can recognize; while the XML representation contains the DB Table's Field/Column Name as it appears in the DB design view.</p>
  
  <p>Is there a performance hit in passing the two varchar(max) parameters to the SQL Stored Procedure?</p>
  
  <p>If so, would it be beneficial to pass only one of the varchar(max) parameter and setup a User-Define-Function that will parse through the parameter and create the user friendly values to display to the user? I'm concerned that there will be multiple calls to the User-Defined-Function, resulting in a performance hit.</p>
  
  <p>Thoughts?</p>
  
  <p>Thanks!
  Rusty</p>