Created
January 31, 2019 13:30
-
-
Save aalfiann/acc4fdbb4a141a356ef991f397a7701f to your computer and use it in GitHub Desktop.
SQLite for big data with pragma in php way
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $db = new SQLite3('/my/sqlite/file.sqlite3'); | |
| $db->busyTimeout(5000); | |
| // WAL mode has better control over concurrency. | |
| // Source: https://www.sqlite.org/wal.html | |
| $db->exec('PRAGMA main.cache_size=10000;PRAGMA main.locking_mode=EXCLUSIVE;PRAGMA main.synchronous=NORMAL;PRAGMA main.journal_mode=WAL;'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment