Importing and parsing a large XML file in SQL Server (when “normal” methods are rather slow)
- 阅读更多 关于 Importing and parsing a large XML file in SQL Server (when “normal” methods are rather slow)
问题 I have a large XML file that I need to import and parse into tabular structure ("flatten") in SQL Server. By "large" I mean a file that is around 450 MB, contains up to 6-7 nested levels and lots of elements, ~300. I tried parsing the file both with OPENXML and Xml.Nodes . Both of the methods are slow. A partial query which reads a parent element and it's nested grandchildren takes several minutes if not dozens to run. I tried using the SQLXML Bulk Load method. Unfortunately I couldn't -