3 ms·
I use JSONB heavily in a large application in production for many years. A few things to be careful of: Unbounded Data this will have performance problems for
by agentultra 7y ago
I use JSONB heavily in a large application in production for many years. A few things to be careful of:
Unbounded Data this will have performance problems for your data set as the size of your table grows. One single value in one row that is 8MB of JSON will bring down the performance of an entire collection.
which leads to
Schema keep your documents structured and validate them before they touch the database. At least the parts your indexes care about. GIN indexes can get pretty big.
Indexes GIN indexes are fairly costly to produce on large data sets. You may need to consider partitioning and careful use of GIN indexes to maintain fast query speeds with online updates.
- spousty 7y agoThanks for the this great information. In the hands on tutorial linked in the article I address some of these constraints you talk about.