!zghijEASpYQWYFzriI:nixos.org

Hydra

394 Members
111 Servers

Load older messages


SenderMessageTime
11 Jan 2022
@grahamc:nixos.org@grahamc:nixos.orgbut again a LIKE is actually fine if it is a suffix only like, ie: LIKE "/nix/store/xxxx%"00:59:37
@grahamc:nixos.org@grahamc:nixos.orgluckily nix store paths are very predictable, so this could be detected00:59:55
@ius:nltrix.net@ius:nltrix.net Yeah, but you'd want to support searching for yah9mf7x2ycalb28gg9ximh49g0akkrn as well ideally 01:00:05
@grahamc:nixos.org@grahamc:nixos.orgyeah, exactly01:00:21
@grahamc:nixos.org@grahamc:nixos.org so we could identify it contains a Nix store path's hash and prefix it with /nix/store/ and append a % 01:00:34
@ius:nltrix.net@ius:nltrix.netSo which made me wonder, wouldn't it help to extract the hash using a regex, and match using equals, so you can use the HASH index?01:00:47
@grahamc:nixos.org@grahamc:nixos.orgmy experiments on using a btree index and a like can produce good results is ~10-20ms01:01:11
@ius:nltrix.net@ius:nltrix.netThen you don't even need a LIKE. Unless there's a great reason for LIKE's on the full path.01:01:12
@grahamc:nixos.org@grahamc:nixos.orga hash index might be good01:01:32
@ius:nltrix.net@ius:nltrix.netRight01:03:10
@ius:nltrix.net@ius:nltrix.net Only drawback of scrapping the LIKE is that you can't search the path for a name 01:03:42
@grahamc:nixos.org@grahamc:nixos.org right, though the name is part of the nixname field already 01:06:07
@ius:nltrix.net@ius:nltrix.netYeah, was about to suggest that as well01:06:35
@grahamc:nixos.org@grahamc:nixos.org in general the search could be much faster and better 01:06:36
@grahamc:nixos.org@grahamc:nixos.organd without even a massive amount of work01:06:48
@ius:nltrix.net@ius:nltrix.netI wouldn't mind spending a few hours, but oh boy perl.01:07:01
@grahamc:nixos.org@grahamc:nixos.org:)01:07:28
@grahamc:nixos.org@grahamc:nixos.orgI like to see PRs come with a lot of tests, which typically pushes the Perl from yucky Perl to tolerable01:07:59
@grahamc:nixos.org@grahamc:nixos.orgimho01:08:01
@ius:nltrix.net@ius:nltrix.netAre there any samples/excepts of the database anywhere? The builds/buildoutputs table in particular I guess01:10:06
@ius:nltrix.net@ius:nltrix.netI wanted to give debugging it a shot (though writing anything but SQL might not be my forte)01:11:10
@grahamc:nixos.org@grahamc:nixos.orgwell ... I can try and get you an export, but it is quite large. are you on github?01:12:24
@ius:nltrix.net@ius:nltrix.netSure, same nickname.01:12:40
@grahamc:nixos.org@grahamc:nixos.orgmind if I DM?01:13:07
@ius:nltrix.net@ius:nltrix.netnot at all01:13:15
@ius:nltrix.net@ius:nltrix.netbtw, while digging in I noticed something else01:14:13
@ius:nltrix.net@ius:nltrix.net
$ rg IndexBuildOutputsOnPath
upgrade-12.sql
1:create index IndexBuildOutputsOnPath on BuildOutputs(path);
01:14:28
@ius:nltrix.net@ius:nltrix.net That index doesn't seem to be part of hydra.sql.. 01:15:21
@ius:nltrix.net@ius:nltrix.net(which I assume is the full up-to-date schema)01:15:35
@grahamc:nixos.org@grahamc:nixos.orgyeah, it should be01:17:54

Show newer messages


Back to Room ListRoom Version: 6