简体   繁体   English

备份大对象的最佳方法是什么?

[英]What is the best way to backup large objects?

I have an object (List) that contains around 10,000,000 records, I want to save them to the disk (or somewhere else?) in real-time and load them when my app comes up (in case it was crashed or something) 我有一个包含大约10,000,000条记录的对象(列表),我想将它们实时保存到磁盘(或其他位置?),并在我的应用程序启动时加载它们(以防崩溃或其他原因)

What is the best way to do it fast? 最快做到最好的方法是什么?

As answered by Tigran, if you require a full database or only want to perform changes to the data, go for Sqlite or SQL Server Compact . 正如Tigran回答的那样,如果您需要一个完整的数据库或只想对数据进行更改,请使用Sqlite或SQL Server Compact

If however, you simply want to save and restore the list in its entirety, you could use serialization to save it to a file. 但是,如果只想保存并完整还原列表,则可以使用序列化将其保存到文件中。

Use Sqlite to save it on disk in fully featured ACID database. 使用Sqlite将其保存在功能齐全的ACID数据库中的磁盘上。

No services, just a library you have and a file you create on the disk . 没有服务,只有一个库和在磁盘上创建的文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM