okay, i just did something incredibly cursed.
behold! using CTEs and ARRAY_AGG to return two separate results in one query.
this is what happens if someone writes a query with joins that takes 16s on my machine.
my monstrosity takes half the time to complete.
chaos.social – a Fediverse instance for & by the Chaos community