ok i see. so it’s probably an issue of combining large count and large average size (edited)
yeah, it does look like there is scaling issue with postgres for querying jsonb.
btw, do you have insights in why langfuse uses clickhouse (https://langfuse.com/self-hosting) for saving traces, I wonder if it's because this problem. I don't have experience with clickhouse, but our company has some applications that use it, anecdotally, it's fast for json querying.