caught this in production last quarter and the answer is more boring than i expected: GIN and BTREE on the same JSONB column solve different problems, and the right choice depends on the SHAPE of your queries, not the size of the data.
heres the actual benchmark + when each one wins.
the setup
table: users with 2.3M rows. one column attributes JSONB. typical row contains:
{







