guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] cuirass: Perform some database "optimization" at startup.


From: Danny Milosavljevic
Subject: Re: [PATCH] cuirass: Perform some database "optimization" at startup.
Date: Mon, 25 May 2020 12:48:49 +0200

Hi Chris,

the docs at https://www.sqlite.org/pragma.html#pragma_optimize suggest to run
"PRAGMA optimize" at the end of the connection, or periodically--not at the
beginning.

That makes sense since it has to be able to see which queries are emitted
in order to know what to optimize.

Also, docs say:

> The query planner used sqlite_stat1-style statistics for one or more indexes
> of the table at some point during the lifetime of the current connection. 

That probably means one would have had to run ANALYZE at some point in the past.


Replaying the WAL sounds like a good idea at the beginning, though.  Most
journalling filesystems do that too.

Attachment: pgpvgQvxr62V9.pgp
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]