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/