Android Room数据库创建了3个文件,包括-shm和-wal文件 [英] Android Room database created 3 files including -shm and -wal files
问题描述
我已经使用Room数据库库创建了一个名为ImageDatabase的数据库,当我在Android Studio中打开设备文件浏览器的数据库文件夹中时,有三个文件名为ImageDatabase,ImageDatabase-shm和ImageDatabase-wal.我想知道这些文件是什么意思?任何帮助都会很棒谢谢所有人
I have created a database using Room database library with name ImageDatabase, when I opened my Device File explorer in Android studio inside the database folder there were three files with names ImageDatabase, ImageDatabase-shm and ImageDatabase-wal. I wanted to know what are these files meant for? Any help would be great Thanx All
推荐答案
数据库中的数据全部包含在这三个数据库中.没有扩展名的是主数据库.其他是 W 仪式 A 头 L og文件( -wal
)和 Sh 获得 M 记忆文件( -shm
).基础SQLite系统使用它们来提高性能,并包含对主数据库的最新更改,直到检查点完成.您可以在 SQLite文档中找到更多信息.
The data in your database is contained in all three. The one with no extension is the main database. The others are the Write Ahead Log file (-wal
) and the Shared Memory file (-shm
). They are used by the underlying SQLite system to improve performance, and contain the latest changes to the main database until a checkpoint is done. You can find more information in the SQLite docs.
这篇关于Android Room数据库创建了3个文件,包括-shm和-wal文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!