Commit

18705ee

Finally got around to adding a jsonb_path_ops GIN index on an events payload column in Postgres instead of the default jsonb GIN index. Shaved off about 40% of the index storage size and boosted @> containment query speeds noticeably.
Did you compare it with an expression index on the specific key?

commit 18705ee

The main point of the post was comparing GIN default (jsonb_ops) vs jsonb_path_ops specifically for containment queries. An expression index definitely wins for a single known key, but when you need multi-key/arbitrary containment indexing across the entire payload,…