Skip to content

Commit

Permalink
docs: clarify concurrency behavior in WAL mode (#15382)
Browse files Browse the repository at this point in the history
  • Loading branch information
rtzll authored Nov 24, 2024
1 parent 6c915fc commit 618d2cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/api/sqlite.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ To instead throw an error when a parameter is missing and allow binding without
import { Database } from "bun:sqlite";

const strict = new Database(
":memory:",
":memory:",
{ strict: true }
);

Expand Down Expand Up @@ -177,7 +177,7 @@ const query = db.prepare("SELECT * FROM foo WHERE bar = ?");

## WAL mode

SQLite supports [write-ahead log mode](https://www.sqlite.org/wal.html) (WAL) which dramatically improves performance, especially in situations with many concurrent writes. It's broadly recommended to enable WAL mode for most typical applications.
SQLite supports [write-ahead log mode](https://www.sqlite.org/wal.html) (WAL) which dramatically improves performance, especially in situations with many concurrent readers and a single writer. It's broadly recommended to enable WAL mode for most typical applications.

To enable WAL mode, run this pragma query at the beginning of your application:

Expand Down

0 comments on commit 618d2cb

Please sign in to comment.