From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id KOSIH7MKNV+cMAAA0tVLHw (envelope-from ) for ; Thu, 13 Aug 2020 09:41:07 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id aOo8G7MKNV/VXwAAbx9fmQ (envelope-from ) for ; Thu, 13 Aug 2020 09:41:07 +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 27E0D940142 for ; Thu, 13 Aug 2020 09:41:07 +0000 (UTC) Received: from localhost ([::1]:55106 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k69jO-0000ev-39 for larch@yhetil.org; Thu, 13 Aug 2020 05:41:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39386) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k69jF-0000ei-DT for guix-devel@gnu.org; Thu, 13 Aug 2020 05:40:57 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:43453) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k69jD-0000jt-7h for guix-devel@gnu.org; Thu, 13 Aug 2020 05:40:57 -0400 X-Originating-IP: 86.246.37.13 Received: from bababa (lfbn-idf2-1-572-13.w86-246.abo.wanadoo.fr [86.246.37.13]) (Authenticated sender: mail@ambrevar.xyz) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 9B68EFF810; Thu, 13 Aug 2020 09:40:50 +0000 (UTC) From: Pierre Neidhardt To: Arun Isaac , Ricardo Wurmus Subject: Re: File search progress: database review and question on triggers In-Reply-To: <87eeobh01d.fsf@systemreboot.net> References: <87sgcuh8rb.fsf@ambrevar.xyz> <87y2ml429i.fsf@elephly.net> <87364tgja3.fsf@ambrevar.xyz> <87y2mlf4jw.fsf@ambrevar.xyz> <87pn7x3pyw.fsf@elephly.net> <87r1sbel4f.fsf@ambrevar.xyz> <87eeobh01d.fsf@systemreboot.net> Date: Thu, 13 Aug 2020 11:40:49 +0200 Message-ID: <87d03uevdq.fsf@ambrevar.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Received-SPF: pass client-ip=217.70.183.199; envelope-from=mail@ambrevar.xyz; helo=relay9-d.mail.gandi.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/13 05:40:51 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, FROM_SUSPICIOUS_NTLD=1, PDS_OTHER_BAD_TLD=1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=no autolearn_force=no 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: -3.11 X-TUID: wQkD02212zg+ --=-=-= Content-Type: text/plain Arun Isaac writes: > sqlite insert statements can be very fast. sqlite.org claims 50000 > or... I tried it, and got it down to... 30s! Turns out that Guix already provides `call-with-transaction' which I've used here. So SQLite is back on the table. >> I need to measure the time SQL takes for a regexp match. > > sqlite, by default, does not come with regexp support. You might have to > load some external library. See > https://www.sqlite.org/lang_expr.html#the_like_glob_regexp_and_match_operators > > --8<---------------cut here---------------start------------->8--- > The REGEXP operator is a special syntax for the regexp() user > function. No regexp() user function is defined by default and so use of > the REGEXP operator will normally result in an error message. If an > application-defined SQL function named "regexp" is added at run-time, > then the "X REGEXP Y" operator will be implemented as a call to > "regexp(Y,X)". > --8<---------------cut here---------------end--------------->8--- After more reading, I see the following options: - Either we use the sqlite-pcre extension (which is not packaged in Guix). - Or we extend guile-sqlite to add a binding to create_function (https://www.sqlite.org/appfunc.html). - Or do you think SQLite patterns (using "%") would do for now? As Mathieu pointed out, it's an unfortunate inconsistency with the rest of Guix. But maybe regexp support can be added in a second stage. Thoughts? -- Pierre Neidhardt https://ambrevar.xyz/ --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl81CqIACgkQm9z0l6S7 zH88LAf9EvzWNOrAjczsBbA2nOumKtvEwS5oKmCkzd9S9sM4eC6/goqdcCVEnSgv 2v/U21bQyD5jaLdh1qlPRFDeBiAZJ+dsZ2aLuf8/ICEhLxHOu6bnc9RA6llhWdUk KXULd4qtSKF5l5A2pJdUqXKgaXb/TLrZKrE2j7jkZBR5Shsm97kTPeLRPcrVvHW5 8ZmAGzjUW7JWhtNgWQhkbyIw66j9WSPFFjrIPQus4HE5c8LVi5mUBn22B4N75+Bs I6eeXIS84aXlcTn5LZqt6e4w0DVWkqzUPYO3khMFmoOMH/57GbP8GMA7VpGQ2aKM pQ7/4RgruZU7gRXO7z3QQZ2cQF53uw== =koml -----END PGP SIGNATURE----- --=-=-=--