Linq to XML speed vs MySql speed
-
Has anyone benchmarked XML Linq speed compared to network'd MySql? I have a fairly big XML database here and was wondering if I might get better performance by loading it into MySql. It's the read access I'm most interested in at the moment. Yeah, I know I could mash up some test code, but I wondered what the scuttlebutt might be. Budsy
-
Has anyone benchmarked XML Linq speed compared to network'd MySql? I have a fairly big XML database here and was wondering if I might get better performance by loading it into MySql. It's the read access I'm most interested in at the moment. Yeah, I know I could mash up some test code, but I wondered what the scuttlebutt might be. Budsy
I think MySql will be better if the size of the data is very long. Reading the entire xml file into memory and then apply LINQ will not be great compared to Database. In case of database you can select only the part you want. XML files are read totally into memory before searching. :)
Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.
My Latest Articles-->** Simplify Code Using NDepend
Basics of Bing Search API using .NET
Microsoft Bing MAP using Javascript -
Has anyone benchmarked XML Linq speed compared to network'd MySql? I have a fairly big XML database here and was wondering if I might get better performance by loading it into MySql. It's the read access I'm most interested in at the moment. Yeah, I know I could mash up some test code, but I wondered what the scuttlebutt might be. Budsy
MySQL is RDBMS system and tuned for high performance. So you will get better performance than file system storage like XML. LINQ to XML is just an abstraction over the XML manipulation classes and it has to read the nodes sequentially. So the larger your file, slower your program will be.
Best wishes, Navaneeth
-
Has anyone benchmarked XML Linq speed compared to network'd MySql? I have a fairly big XML database here and was wondering if I might get better performance by loading it into MySql. It's the read access I'm most interested in at the moment. Yeah, I know I could mash up some test code, but I wondered what the scuttlebutt might be. Budsy
" I have a fairly big XML database here and was wondering if I might get better performance by loading it into MySql." If I unterstood well, you want to "load" the xml file into MySQL witch means reading it and then loading it into the DB. If this is the case then it makes no sense. Just load it and LINQ it. If you want to give up the XML and use the DB taht's a totally different thing and it will be faster(a lot faster) especially for large amounts of data.