Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Room database created 3 files including -shm and -wal files

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

like image 434
abby Avatar asked Mar 13 '20 06:03

abby


1 Answers

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.

like image 129
Ryan M Avatar answered Oct 18 '22 00:10

Ryan M