Share via


SQLiteDatabase.JournalModeWal Field

Definition

The WAL journaling mode uses a write-ahead log instead of a rollback journal to implement transactions.

[Android.Runtime.Register("JOURNAL_MODE_WAL", ApiSince=33)]
public const string JournalModeWal;
[<Android.Runtime.Register("JOURNAL_MODE_WAL", ApiSince=33)>]
val mutable JournalModeWal : string

Field Value

Attributes

Remarks

The WAL journaling mode uses a write-ahead log instead of a rollback journal to implement transactions. The WAL journaling mode is persistent; after being set it stays in effect across multiple database connections and after closing and reopening the database.

Performance Considerations: This mode is recommended when the goal is to improve write performance or parallel read/write performance. However, it is important to note that WAL introduces checkpoints which commit all transactions that have not been synced to the database thus to maximize read performance and lower checkpointing cost a small journal size is recommended. However, other modes such as DELETE will not perform checkpoints, so it is a trade off that needs to be considered as part of the decision of which journal mode to use.

See here for more details.

Java documentation for android.database.sqlite.SQLiteDatabase.JOURNAL_MODE_WAL.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to