snix/users/Profpatsch/whatcd-resolver/src
Profpatsch cb5a745233 fix(users/Profpatsch/whatcd-resolver): speed up artist_ids lookups
We need `artist_ids` in most of the queries, so let’s make them a
generated column and put an index on them.

This reduces times for getArtistNameById from ~300ms to ~20ms and for
the main “latest” table from ~250ms to ~60ms.

The `artist_has_been_snatched` logic moves into the torrent filter, so
we don’t have to work on such large records further down.

Change-Id: I5a1929bd9c81ea0031e512d01897c0e460ded077
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13240
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2025-03-10 16:55:15 +00:00
..
AppT.hs feat(users/Profpatsch/whatcd-resolver): generic otel struct attrs 2025-01-16 19:44:32 +00:00
Bencode.hs feat(users/Profpatsch/whatcd-resolver): add a simple torrent parser 2025-03-06 23:41:43 +00:00
Html.hs refactor(users/Profpatsch/whatcd-resolver): use builder for otel 2025-01-05 21:00:11 +00:00
Http.hs feat(users/Profpatsch/whatcd-resolver): locally serve resources 2025-03-07 15:22:58 +00:00
JsonLd.hs refactor(users/Profpatsch/whatcd-resolver): continue http 2024-08-06 09:59:40 +00:00
Optional.hs feat(users/Profpatsch/whatcd-resolver): trace http requests 2024-03-23 19:51:59 +00:00
Redacted.hs fix(users/Profpatsch/whatcd-resolver): speed up artist_ids lookups 2025-03-10 16:55:15 +00:00
Transmission.hs refactor(users/Profpatsch/whatcd-resolver): use builder for otel 2025-01-05 21:00:11 +00:00
WhatcdResolver.hs fix(users/Profpatsch/whatcd-resolver): speed up artist_ids lookups 2025-03-10 16:55:15 +00:00