
In order to check the feasibility, I have included plain string, boolean, numbers, Array of Strings, and a complex object. Below is how the data is saved for different countries and professions as well. There are few more additional details collected which are applicable for a country and also for a profession that they belong to. I have created a sample application that stored basic data of users like their name, contact_number, security_number, and country in normal RDBMS columns.
#POSTGRES JSON QUERY PERFORMANCE CODE#
Please find complete source code on the java front which has an auditing framework as well here. Data Saving and analysis of select queries Maximum size Postgres JsonB can support As per Postgres official documentation, the maximum size is 255 MB per document.

It may take more disk space than plain JSON due to a larger table footprint, though not always.Slightly slower input (due to added conversion overhead).simpler schema designs (replacing entity-attribute-value (EAV) tables with JSONB columns, which can be queried, indexed, and joined, allowing for performance improvements up until 1000X!) Supports indexing (which can be a significant advantage, as we’ll see later).


The data type JSON and JSONB, as defined by the PostgreSQL documentation, are almost identical the key difference is that JSON data is stored as an exact copy of the JSON input text, whereas JSONB stores data in a decomposed binary form that is, not as an ASCII/UTF-8 string, but as binary code.
