Skip to content

Commit

Permalink
cgosqlite: set SQLITE_TEMP_STORE=1
Browse files Browse the repository at this point in the history
SQLITE_TEMP_STORE=1 allows PRAGMA temp_store = MEMORY, while keeping
temporary files as the default behavior for temporary storage.

This can be used to accelerate some migrations, when building an
in-memory temporary btree to use in a later correlated subquery is
faster than the query planner would normally do things, for example when
optimizing locality or btree operation order.
  • Loading branch information
raggi committed May 28, 2024
1 parent 99c0716 commit 751f54c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cgosqlite/cgosqlite.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ package cgosqlite
// #cgo CFLAGS: -DSQLITE_ENABLE_COLUMN_METADATA
// #cgo CFLAGS: -DSQLITE_ENABLE_STAT4
// #cgo CFLAGS: -DSQLITE_ENABLE_DBSTAT_VTAB=1
// #cgo CFLAGS: -DSQLITE_TEMP_STORE=1
// #cgo CFLAGS: -DHAVE_USLEEP=1
//
// // Select POSIX 2014 at least for clock_gettime.
Expand Down

0 comments on commit 751f54c

Please sign in to comment.