From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id IJh6Nr+iy15EawAA0tVLHw (envelope-from ) for ; Mon, 25 May 2020 10:49:35 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id uGpQMr+iy14IcwAA1q6Kng (envelope-from ) for ; Mon, 25 May 2020 10:49:35 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9F1E99404D0 for ; Mon, 25 May 2020 10:49:35 +0000 (UTC) Received: from localhost ([::1]:51584 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdAfm-0000GU-L5 for larch@yhetil.org; Mon, 25 May 2020 06:49:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54858) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdAfe-0000GM-CM for guix-devel@gnu.org; Mon, 25 May 2020 06:49:26 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:44986) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdAfd-0003Ja-1f for guix-devel@gnu.org; Mon, 25 May 2020 06:49:25 -0400 Received: from localhost (80-110-127-207.cgn.dynamic.surfer.at [80.110.127.207]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 50A3F33623B8; Mon, 25 May 2020 12:49:20 +0200 (CEST) Date: Mon, 25 May 2020 12:48:49 +0200 From: Danny Milosavljevic To: Christopher Baines Subject: Re: [PATCH] cuirass: Perform some database "optimization" at startup. Message-ID: <20200525124849.35071b94@scratchpost.org> In-Reply-To: <20200525101518.17526-1-mail@cbaines.net> References: <20200525101518.17526-1-mail@cbaines.net> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/EraK8Vliy9YMdbYcog3t23d"; protocol="application/pgp-signature"; micalg=pgp-sha512 Received-SPF: none client-ip=85.13.145.193; envelope-from=dannym@scratchpost.org; helo=dd26836.kasserver.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/25 06:49:20 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel@gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Spam-Score: -1.11 X-TUID: 3VwxtzYCCBLY --Sig_/EraK8Vliy9YMdbYcog3t23d Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Chris, the docs at https://www.sqlite.org/pragma.html#pragma_optimize suggest to r= un "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 inde= xes > of the table at some point during the lifetime of the current connection.= =20 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. --Sig_/EraK8Vliy9YMdbYcog3t23d Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl7LopEACgkQ5xo1VCww uqU+AQf+IMXhFwaE6QJKcbwCJS2UDRueu4Ke2KSzH7Emuogvoc+nKltCNPLTJMo3 ZmHItLbv5FNVJgzJq9J87C2jSMc0ZPtwlvhU7fll/qlrovnYuQ77puruAXTc0ZUp IJ9b4SMLPTH48M92OL+Me6BrxnQzyMX381SiQfq818Ge/ODfnn9OxuuQmXt8DtAG s5AR+a9uX/YWWo1Xq6dtHb716bt7wel2AjERasr2b2wgUKok6EmznQAcs3oWv4lj 3FijgKGZQLSLQzldAoZ8q1nhmZs0azMNmcttSddOXTjNe8FL7cszq+8darSvzC2Z JSHgYkXfdgQRY8DJ1SOHzECaIEjfuw== =vdTV -----END PGP SIGNATURE----- --Sig_/EraK8Vliy9YMdbYcog3t23d--