SQL Server Performance

XML data Type

Discussion in 'SQL Server 2005 General DBA Questions' started by SQL2000DBA, Oct 12, 2006.

  1. SQL2000DBA New Member


    I need input on selecting input parameter variable for stored procedure. I am confuse whether to use standard approach of using one input variable as XML data type to stored procedure or use varchar or int variable as input parameter with multiple parameter. I wanted to know if in case i have to pass only five inputs to a stored procedure whether i should use input parameter as XML(passing all five in XML) or use five input parameter. Please let me know whether any overhead i need to consider when selecting input parameter as XML.

    Thanks and Regards
    Ravi K
  2. Roji. P. Thomas New Member

    The optimizer prefers indicidual parameters. Consider passing parmeters as XML only when you have to set multiple set of parameters, for eg, for a multi row insert.

    Roji. P. Thomas
  3. SQL2000DBA New Member

    Hi Thomas,

    Thansk for your reply. Do you have any document or link which talk about pros and cons in detail.

    Thanks and Regards
    Ravi K

Share This Page