What is the fastest way to load an XML file into MySQL using C#?

后端 未结 8 1056
独厮守ぢ
独厮守ぢ 2020-12-15 09:19

Question

What is the fastest way to dump a large (> 1GB) XML file into a MySQL database?

Data

The data in question is the StackOverflow Creative

8条回答
  •  悲哀的现实
    2020-12-15 09:37

    Ok, I'm going to be an idiot here and answer your question with a question.

    Why put it in a database?

    What if ... just a what-if... you wrote the xml to files on local drive and, if needed, write some indexing information in the database. This should perform significantly faster than trying to load a database and would much more portable. All you would need on top of it is a way to search and a way to index relational references. There should be plenty of help with searching, and the relational aspect should be easy enough to build? You might even consider re-writing the information so that each file contains a single post with all the answers and comments right there.

    Anyway, just my two-cents (and that is not worth a dime).

提交回复
热议问题