2
0
Fork 0
mirror of git://git.savannah.gnu.org/guix/guix-cuirass.git synced 2023-12-14 06:03:04 +01:00
guix-cuirass/src/sql
Mathieu Othacehe 930c2f315c
Do not allow full search on nix_name field.
Searching for something like "%a%" can take up to ten minutes. Remove the
usage of special characters "^" and "$" in queries. Instead, always add a "%"
character at the end of the query. Also add an index on the nix_name field.

Fixes: <https://issues.guix.gnu.org/43791>.

* src/sql/upgrade-13.sql: New file.
* Makefile.am (dist_sql_DATA): Add it.
* src/schema.sql (Builds_nix_name): New index.
* src/cuirass/database.scm (query->bind-arguments): Remove support for "^" and
"$" special characters. Instead make sure that the query does not contain any
"%" character and prefix the query by "%".
(db-get-builds-by-search): Remove an useless query nesting level.
* src/cuirass/templates.scm (search-form): Adapt the search help message
accordingly.
2020-10-05 14:54:06 +02:00
..
upgrade-1.sql Add support for multiple inputs. 2018-07-16 21:33:14 +02:00
upgrade-2.sql database: Merge Derivations into Builds table. 2018-08-16 19:19:23 +02:00
upgrade-3.sql database: Add a Checkouts table. 2018-08-27 15:38:44 +02:00
upgrade-4.sql database: Add builds only if one of their outputs is new. 2018-09-29 22:29:06 +02:00
upgrade-5.sql Support publishing build events 2020-01-16 08:32:52 +00:00
upgrade-6.sql Alter the Builds table to have an id field 2020-01-25 22:22:39 +00:00
upgrade-7.sql Add support for build products downloading. 2020-06-10 16:42:21 +02:00
upgrade-8.sql sql: Add a couple of indexes. 2020-06-13 16:02:59 +01:00
upgrade-9.sql Save evaluations and checkouts timestamps. 2020-09-06 13:03:08 +02:00
upgrade-10.sql Add a status field to Evaluation table. 2020-09-10 15:16:15 +02:00
upgrade-11.sql Add metrics support. 2020-09-14 14:32:12 +02:00
upgrade-12.sql Optimize database queries. 2020-09-28 17:49:55 +02:00
upgrade-13.sql Do not allow full search on nix_name field. 2020-10-05 14:54:06 +02:00