Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sqlite/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
什么时候应该使用NSKeyedArchiver而不是SQLite?_Sqlite_Memory_Storage_Record_Nskeyedarchiver - Fatal编程技术网

什么时候应该使用NSKeyedArchiver而不是SQLite?

什么时候应该使用NSKeyedArchiver而不是SQLite?,sqlite,memory,storage,record,nskeyedarchiver,Sqlite,Memory,Storage,Record,Nskeyedarchiver,我正在编写一个iPhone应用程序,它需要存储大约10条记录,每条记录占用20-200KB的空间。我需要在NSKeyedArchiver和SQLite之间进行选择。我的问题是: 哪一个占用更少的存储空间 哪一个读入内存更快?哪种回写速度更快 谢谢 只需10条记录,使用NSKeyedArchiver就容易多了。SQL通常用于成千上万条记录中更密集的数据库任务。我想说,除非你真的需要,否则可能不值得花时间编写代码

我正在编写一个iPhone应用程序,它需要存储大约10条记录,每条记录占用20-200KB的空间。我需要在NSKeyedArchiver和SQLite之间进行选择。我的问题是:

  • 哪一个占用更少的存储空间
  • 哪一个读入内存更快?哪种回写速度更快

  • 谢谢

    只需10条记录,使用
    NSKeyedArchiver
    就容易多了。SQL通常用于成千上万条记录中更密集的数据库任务。我想说,除非你真的需要,否则可能不值得花时间编写代码