如何禁用Android的SQLite的日志文件? [英] How to disable Android SQLite Journal file?
问题描述
我使用的交易,以多行插入表中。但是,我还是看到sqlite的表一起在SD卡上创建临时的sqlite-日志文件。
I am using transactions to insert multiple rows into table. But, I still see temporary sqlite-journal file being created on SD Card along with sqlite table.
我如何禁用日志文件的创建?
How do I disable creation of journal file?
感谢
推荐答案
您可以选择保留该杂志在内存中,以便没有-journal文件被创建:
You can elect to keep the journal in memory so that no -journal file is created:
pragma journal_mode=memory;
请注意,你需要把这个打开数据库,每次运行。
Note that you need to run this each time you open the database.
我建议您阅读以下获得正在发生的事情的一个更好的主意:
I recommend that you read the following to get a better idea of what is going on:
<一个href=\"http://www.sqlite.org/pragma.html#pragma_journal_mode\">http://www.sqlite.org/pragma.html#pragma_journal_mode
这篇关于如何禁用Android的SQLite的日志文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!