Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP/RFC] AppServiceProvider: configure journal_mode=WAL for sqlite #809

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

schu
Copy link
Member

@schu schu commented Apr 15, 2024

There doesn't seem to be a way to configure SQLite pragmas like journal_mode=WAL from Laravel's database config (if there is a way, please let us know). Therefore, configure the SQLite database in the AppServiceProvider upon boot.

More infos on journal_mode=WAL and relevant pragma knobs for performance can be found under the links below:

https://www.sqlite.org/pragma.html#pragma_journal_mode

https://phiresky.github.io/blog/2020/sqlite-performance-tuning/

Resolves #759 (I think..)

There doesn't seem to be a way to configure SQLite pragmas like
`journal_mode=WAL` from Laravel's database config (if there is a way,
please let us know). Therefore, configure the SQLite database in the
`AppServiceProvider` upon boot.

More infos on `journal_mode=WAL` and relevant pragma knobs for
performance can be found under the links below:

https://www.sqlite.org/pragma.html#pragma_journal_mode

https://phiresky.github.io/blog/2020/sqlite-performance-tuning/

Resolves #759 (I think..)
@schu
Copy link
Member Author

schu commented Apr 15, 2024

Not sure yet if this is the best approach to do it..?

@levinuss
Copy link
Contributor

According to this blog post, at least the PRAGMA journal_mode = WAL; call can be reduced to one execution once per database as part of a migration.
For the other commands an AppServiceProvider seems to be the best option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docs: document on how to run OMC with SQLite
2 participants