]> git.proxmox.com Git - pve-cluster.git/commit
pmxcfs: db: tell query planner that prepared statement are long living
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 22 Apr 2021 08:46:42 +0000 (10:46 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 22 Apr 2021 19:37:55 +0000 (21:37 +0200)
commit49426115036ecc54ebcb174d37e6bc2c0c17d158
tree2b5a1ba2c4681405bc9e76aa8c3cc4834c853c6b
parentc44bb3d626c89d407212494695d2ff36029ba6b3
pmxcfs: db: tell query planner that prepared statement are long living

SQLITE_PREPARE_PERSISTENT
    The SQLITE_PREPARE_PERSISTENT flag is a hint to the query planner
    that the prepared statement will be retained for a long time and
    probably reused many times. Without this flag,
    sqlite3_prepare_v3() and sqlite3_prepare16_v3() assume that the
    prepared statement will be used just once or at most a few times
    and then destroyed using sqlite3_finalize() relatively soon. The
    current implementation acts on this hint by avoiding the use of
    lookaside memory so as not to deplete the limited store of
    lookaside memory. Future versions of SQLite may act on this hint
    differently.
-- https://sqlite.org/c3ref/c_prepare_normalize.html#sqlitepreparepersistent

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
data/src/database.c