Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Why newbies do not like MongoDB

Why newbies do not like MongoDB

The talk about "Why newbies do not like MongoDB" presented in lightning talks section on PyCon Russia 2013

Serge Matveenko

February 25, 2013
Tweet

More Decks by Serge Matveenko

Other Decks in Programming

Transcript

  1. Newbie questions • How to link documents without joins? •

    How to keep documents structure without schema? • What is the correct documents structure? • Why MongoDB is running slowly?
  2. How to link documents • No way • ObjectId(…) •

    DBRef(…) • Merging linked documents
  3. What is the correct documents structure The structure depends on:

    • the way you do queries • the way you display your data • the frequency of the inserts • the frequency of the updates
  4. What is the correct documents structure You need to think

    of: • what the different entities do you have • what documents could be merged with the linked entities • what documents could you merge in packs • what the cost of your indexes • how would you shard your data
  5. Why MongoDB is running slowly • indexes • data structure

    • find(…).explain() • mongodb-user-russian@googlegroups. com