FS#79249 - [sqlite] Compile with SQLITE_ENABLE_STAT4
Attached to Project:
Arch Linux
Opened by mille337 (mille337) - Sunday, 30 July 2023, 10:37 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:23 GMT
Opened by mille337 (mille337) - Sunday, 30 July 2023, 10:37 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:23 GMT
|
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 |
This task depends upon
Closed by Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:23 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/p ackaging/packages/sqlite/issues/1
Saturday, 25 November 2023, 20:23 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/p ackaging/packages/sqlite/issues/1
see also https://sqlite.org/queryplanner-ng.html#qpstab
I guess for common Arch (non-enterprise) use cases we can give STAT4 a higher priority over "query planner stability guarantee" and implement it.