New answers tagged

1 vote

Possible options for SQL and NoSQL combination for social media data

We are designing database schemas for a social media app with posts, groups, users and chats etc and it looks like we have a mix of structured and unstructured data... Having some data examples would ...
J.D.'s user avatar
  • 35.1k
0 votes

How to extract values from a JSON field with Mongodb?

Using MongoDB 7.0.1 and Mongosh 2.0.0. The input JSON example document: let doc = { "user": [ {"email": "[email protected]"}, {"email": "mail6@mail6....
prasad_'s user avatar
  • 418
0 votes

What if Priority 0 Replica Set Members got newest oplog

Expected Behaviour In your MongoDB 4.4 scenario with: A: preferred primary down B: only available candidate for primary C: dedicated secondary with newest oplog The expected outcome is that: B will ...
Stennie's user avatar
  • 10.2k
1 vote

Should i care about field names in JSON datatypes?

For relational databases (RDBMS) like MySQL, MariaDB, PostgreSql it matters a lot, because they store the JSON as text. See the other answers. For a NoSQL database like MongoDB it looks a bit ...
Wernfried Domscheit's user avatar
1 vote

Should i care about field names in JSON datatypes?

Yes, the field names are stored in every JSON document. If you use long field names in the JSON document, the document uses more storage on every row of the table. I showed this in my presentation How ...
Bill Karwin's user avatar
  • 13.9k
1 vote

Should i care about field names in JSON datatypes?

MySQL/MariaDB: The string is stored as a string. This takes space and slows down looking into the string. So, you should, in general, pull the useful columns out of the JSON and put them into columns ...
Rick James's user avatar
  • 76.9k
2 votes

mongodb atlas use secondaries to reduce cpu usage

Read queries in MongoDB can consume a lot of CPU - for example, if you're using the aggregation framework heavily. So unless you have a very specific read-after-write needs, you can use readPreference ...
yossale's user avatar
  • 131

Top 50 recent answers are included