I prefer Postgres for it's JSONB storage and indexing, basically allowing it to take any JSON data as a field and quickly look things up. I see it as having benefits of NoSQL databases while keeping it relational.
What do you mean with JSONB indexing? Sure you can create index on jsonb_column->someField, but I don't think Postgres automatically indexes the json like you would expect from MongoDB on the documents..?
Postgres is awesome and the JSONB can be very useful. But it's not a 100% substitute for anything MongoDB.
You can create a GIN index on jsonb that indexes a variety of different operators. It's not perfect, but it's more than the functional index you put above. End of the day, postgres does not store statistics about sub documents in json, so you'll never get amazing performance when filtering using jsonb; it's best to use it to store data that is just along for the ride.
60
u/tomma5o Sep 24 '20 edited Sep 24 '20
Sorry FE dev here, why you guys prefer postgreSQL over mySQL?