Compile with SQLITE_ENABLE_STAT4
Task Info (Flyspray) | |
---|---|
Opened By | mille337 (mille337) |
Task ID | 79249 |
Type | Feature Request |
Project | Arch Linux |
Category | Packages: Core |
Version | None |
OS | All |
Opened | 2023-07-30 10:37:16 UTC |
Status | Assigned |
Assignee | Andreas Radke (AndyRTR) |
Details
Description:
I noticed that one of my applications (FreshRSS) was much slower after running ANALYZE
on its database (around 1GB). The reason is that the query planner turned out to pick a much worse query plan with sqlite_stat1
than without. SQLite now have an improved ANALYZE
logic that can work around such issues and should provide better plans overall but it's opt-in and needs to be turned on with the SQLITE_ENABLE_STAT4 compile option.
From my local tests, this seem to add about 13kB to the built library (although the compiler was not exactly the same).
Additional info:
- package version(s): 3.42.0
- SQLite doc: https://sqlite.org/compile.html#enable_stat4
- SO post explaining initial ANALYZE drawbacks: https://stackoverflow.com/a/26864482