3 ms·
JSON in Postgres is less performant that MongoDB, that is what I found. Indices over JSON in Postgres leave a lot to be desired - so much so that it required u
by bhouston 3y ago
JSON in Postgres is less performant that MongoDB, that is what I found. Indices over JSON in Postgres leave a lot to be desired - so much so that it required us to design around it. My rule now is do not treat JSON in Postgress like MongoDB otherwise you will have a bad time (e.g. slowness.)
- victor106 3y agoI am surprised there’s no postgres extension to solve this.
- yowlingcat 3y agoIf you need to index over data inside JSON, why not pull out the pieces that need to be indexed into normal relational columns? When I've used Postgres JSON fields in the past, I've used it for unstructured data that doesn't need to be indexed, as if there's anything that does need to be indexed, then it's important enough to extract out to a field for efficiency.
- bhouston 3y agoYes. We are saying the same thing. Treat json in Postgres as a little blob of unstructured data and do not design things in Postgres as you would in mongodb. Minimize json in Postgres or you will have a bad time.
- nesarkvechnep 3y agoMongo costs more than the “slowness” of Postgres’ JSON.