Postgres supports three types for "schemaless" data:
JSON (added
in 9.2),
JSONB
(added in 9.4), and
HSTORE (added in
8.2 as an extension). Unfortunately, the performance of queries of
all three gets substantially slower (2-10×) for values larger than
about 2 kiB, due to how Postgres stores long variable-length data
(TOAST). The
same performance cliff applies to any variable-length types, like
TEXT
and
BYTEA. This
article contains some quick-and-dirty benchmark results to explore
how Postgres's performance changes for the "schemaless" data types
when they become large. My conclusion is that you should expect a
2-10× slower queries once a row gets larger than Postgres's 2 kiB
limit.