Best way to store XML data in a MySQL database, with some specific requirements

后端 未结 4 868
孤独总比滥情好
孤独总比滥情好 2021-02-13 15:44

I am receiving XML data from a service. The test data I am receiving back has about 300 XML nodes, clearly far too many to create individual rows for in a MySQL database.

<
4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-13 16:16

    A lot depends on what you want to do with the data - if you want to search for stuff within the XML, then decomposing it into a tree will give much better query performance.

    500Mb is not a huge amount of data - the issues are all about how you reference it and search it. If it's just for archiving purposes or you never need to search inside the XML, then compressing it then (e.g.) base64 encoding will reduce this down to less than 80Mb

提交回复
热议问题