3 ms·
The question is whether it can be stored like this while allowing for fast queries. For example, unless it changed recently, Postgres doesn't calculate statisti
by icebraining 9y ago
The question is whether it can be stored like this while allowing for fast queries. For example, unless it changed recently, Postgres doesn't calculate statistics to help the query planner on jsonb fields.
- matte_black 9y agoThe answer would make a great blog post.
- zaarn 9y agoJSONB columns should behave just like any datatype with a GIN index in the recent releases, to my knowledge. Still, a JSON column will arguably be faster than a pure KV table since you can more efficiently query it, especially any non-JSON columns.
- ptman 9y agoIIRC JSONB still has problem with index statistics So values in JSONB columns can be indexed nicely, but the statistics can be much worse than for non-JSONB columns, which can lead the query planner astray.
- NickNameNick 9y agoPostgres will let you create an index on an expression into the JSON column, so querying should still be very quick.