GNU bug report logs -
#43791
cuirass: Search queries are too slow.
Previous Next
Reported by: Mathieu Othacehe <othacehe <at> gnu.org>
Date: Sun, 4 Oct 2020 11:18:01 UTC
Severity: normal
Done: Mathieu Othacehe <othacehe <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 43791 in the body.
You can then email your comments to 43791 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org
:
bug#43791
; Package
guix
.
(Sun, 04 Oct 2020 11:18:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Mathieu Othacehe <othacehe <at> gnu.org>
:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org
.
(Sun, 04 Oct 2020 11:18:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hello,
Search queries can take a long time to complete.
This query took 658.67 seconds to complete:
--8<---------------cut here---------------start------------->8---
SELECT * FROM ( SELECT Builds.rowid, Builds.timestamp, Builds.starttime, Builds.stoptime, Builds.log, Builds.status, Builds.job_name, Builds.system, Builds.nix_name, Specifications.name FROM Builds INNER JOIN Evaluations ON Builds.evaluation = Evaluations.id INNER JOIN Specifications ON Evaluations.specification = Specifications.name WHERE (Builds.nix_name LIKE '%hurd-barebones.qcow2%') AND (0 IS NULL OR (Builds.status = 0)) AND ('guix-master' IS NULL OR (Specifications.name = 'guix-master')) AND ('x86_64-linux' IS NULL OR (Builds.system = 'x86_64-linux')) AND (NULL IS NULL OR (NULL < Builds.rowid)) AND (NULL IS NULL OR (NULL > Builds.rowid)) ORDER BY CASE WHEN NULL IS NULL THEN Builds.rowid ELSE -Builds.rowid END DESC LIMIT 1) ORDER BY rowid DESC 658.67
--8<---------------cut here---------------end--------------->8---
and this one:
--8<---------------cut here---------------start------------->8---
SELECT MIN(Builds.rowid) FROM Builds INNER JOIN Evaluations ON Builds.evaluation = Evaluations.id INNER JOIN Specifications ON Evaluations.specification = Specifications.name WHERE (Builds.nix_name LIKE '%ganeti%') AND (NULL IS NULL OR (Builds.status = NULL)) AND (NULL IS NULL OR (Specifications.name = NULL)) AND (NULL IS NULL OR (Builds.system = NULL)) 146.70
--8<---------------cut here---------------end--------------->8---
took 146.70 seconds.
The naive solution of adding an index on nix_name column does not work
as it is still ignored for some reason.
According to https://www.sqlite.org/optoverview.html, starting the LIKE
search pattern with '%' prevent the index use.
However, searching for 'hurd-barebones.qcow2%' also skips the index.
Thanks,
Mathieu
Reply sent
to
Mathieu Othacehe <othacehe <at> gnu.org>
:
You have taken responsibility.
(Mon, 05 Oct 2020 13:03:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Mathieu Othacehe <othacehe <at> gnu.org>
:
bug acknowledged by developer.
(Mon, 05 Oct 2020 13:03:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 43791-done <at> debbugs.gnu.org (full text, mbox):
> However, searching for 'hurd-barebones.qcow2%' also skips the index.
That's because the index was not created in case insensitive mode.
I dropped support for searching with "^" and "$" characters as this is
not compatible with using an index and hence way too slow.
The new search behaviour is to remove any "%" that could be added by the
user, and add one at the end of the query. It should be enough for the
modest search needs in Cuirass and reasonable in term of performance
(< 10 ms).
Anyway, fixed with: 930c2f315c6a9768d31a80d35d2a2550b588deaa.
Thanks,
Mathieu
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 03 Nov 2020 12:24:09 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 229 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.