Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Passing bulk data through xml parameter or table parameter in stored procedure, which one is better Expand / Collapse
Author
Message
Posted Thursday, December 12, 2013 4:25 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, March 19, 2014 6:18 AM
Points: 1, Visits: 6
Hi,

I am passing bulk data to stored procedure through xml string for insert/update operation.
Can any one tell passing bulk data through xml or through table parameter to stored procedure, which one better, with explanation.

Thanks,
Anoop Singh
Post #1522229
Posted Thursday, December 12, 2013 4:56 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 4:07 AM
Points: 2,701, Visits: 1,694
If you are able to influence the development from the off, then I would go with TVP as shreding XML is very expensive.

There are lots of resources on this very topic:

http://www.dbdelta.com/maximizing-performance-with-table-valued-parameters/
http://www.sommarskog.se/arrays-in-sql.html
Post #1522239
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse