Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Performance OpenXML vs Row by Row

Author  Topic 

John Sourcer
Yak Posting Veteran

91 Posts

Posted - 2008-03-11 : 01:07:12
Hi All,

I have an variable size XML file currently +/- 5 MB(8000+ records) but may be bigger. I need to INSERT/UPDATE each row. Which is the better way of doing this? Using selectNodes on the XML and INSERT/UPDATE each row via a SP or using sp_xml_preparedocument and OPENXML therefore only calling the SP once?

John Sourcer
Yak Posting Veteran

91 Posts

Posted - 2008-03-11 : 03:00:04
Heh:

Row by row: 2+ minutes
OPENXml: 9 secs + transactional support

Sorry for stuffing anybody around here!
Go to Top of Page
   

- Advertisement -