Skip to content

SQLite Optimization on BtrFS

Gihwan Oh edited this page Oct 1, 2015 · 3 revisions

#This page is still in progress

SQLite provides two journal modes, RBJ and WAL. OFF and MEM journal modes are actually not a journaling. Both are well-known to everybody who uses SQLite.

FYI, I simply describe characteristics of two journal modes. Please see details on SQLite Homepage

#Rollback Journal Mode All RBJ modes (delete, truncate, persist) replicate old image of an updated page to RBJ file. All updated pages are written in to original database file in a random sequence. After writing all updated pages, RBJ file is deleted, truncated or updated (for delete, truncate, persist mode). RBJ occurs sequential writes to a RBJ file and random writes to original database file. This always writes data pages twice except for newly-created page. Thus, SQLite performance decreases.

#WAL Journal Mode WAL mode (this provides just one WAL mode) runs in different ways compared to RBJ mode.


#An Opportunity on BtrFS

Clone this wiki locally