I have been playing around with inotify and a sqlite database as I wanted to know how often the database file was written.
The thing is that the database file is written everytime I send a query. It does not matter if it is to read (SELECT) or to modify (UPDATE). The inotify flag IN_CLOSE_WRITE is always activated after that.
I wanted to avoid as much writing as possible. Am I missing anything here? Should not the database only be written when performing operations to modify it?