Which is faster: PostgreSQL vs MongoDB on large JSON datasets? I have a large dataset with 9m JSON objects at ~300 bytes each. They are posts from a link aggregator: basically links (a URL, title and author id) and comments (text and author ID) + metadata.

They could very well be relational records in a table, except for the fact that they have one array field with IDs pointing to child records.

What implementation looks more solid?


JSON objects on a PostgreSQL database (just one large table with one column, namely the JSON object)
JSON objects on a MongoDB
Explode the JSON objects into columns and use arrays on PostgreSQL


I want to maximize performance in joins, so I can massage the data and explore it until I find interesting analyses, at which point I think it will be better to transform the data into a form specific to each analysis.
For data load, Postgre outperforms MongoDB.
MongoDB is almost always faster when returning query counts.
PostgreSQL is almost always faster for queries using indexes.

Check out this website  and this one too for more info. They have very detailed explanations.