That looks like a great suggestion, thanks! It looks like we'd need to break out our JSON data into columns (our events table is basically just an event name, time, user id, and then a jsonb column) and rewrite our queries, but it seems more suitable than anything else I've seen so far.
We've been getting good results with some tweaks to our Postgres indexing (partial indexes on event names makes a huge difference) and that'll be even more practical when we can move to logical replication, so will be sticking with that for now.
We've been getting good results with some tweaks to our Postgres indexing (partial indexes on event names makes a huge difference) and that'll be even more practical when we can move to logical replication, so will be sticking with that for now.