]> Sergey Matveev's repositories - public-inbox.git/commit
sqlite: PRAGMA optimize on close
authorEric Wong <e@80x24.org>
Mon, 11 Oct 2021 08:06:16 +0000 (08:06 +0000)
committerEric Wong <e@80x24.org>
Tue, 12 Oct 2021 03:40:35 +0000 (03:40 +0000)
commit4c6d7f06985840068340f33eef81dcf7eb8209e0
treec118e95bdabb77fdad5611cbb978fe2219768c1a
parentc4a4e9809ddd10f2094e1b088728101ace89297f
sqlite: PRAGMA optimize on close

As recommended by SQLite documentation[1]:

  To achieve the best long-term query performance without the need
  to do a detailed engineering analysis of the application schema
  and SQL, it is recommended that applications run "PRAGMA optimize"
  (with no arguments) just before closing each database connection.

Hopefully that works for our use cases and can make things
faster for us.

[1] https://www.sqlite.org/pragma.html#pragma_optimize
lib/PublicInbox/LeiMailSync.pm
lib/PublicInbox/V2Writable.pm