perf(database): index enclosure URL digest as bytea instead of hex
The enclosures_user_entry_url_unique_idx expression index stored the URL digest as encode(sha256(url::bytea), 'hex'), a 64-byte hex text encoding of a 32-byte value. Index the raw sha256(url::bytea) bytea instead to roughly halve the index on disk, and update the matching ON CONFLICT clause in createEnclosure so its inference still resolves to the index. On 150k enclosures the index shrank from 27 MB to 11 MB (~59%).
J
jvoisin committed
a84533db6ca0a2ff9a47800fbf0326be6d9b3170
Parent: b79ba93
Committed by fguillot <323546+fguillot@users.noreply.github.com>
on 8/24/2026, 5:25:46 PM