In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This series of articles are translated from "50 Tips and Tricks for MongoDB Developers". I can't find the Chinese version for the time being. Anyway, I have been studying mongodb deeply recently, so I just want to translate it. On the one hand, enhance the effect of our own learning, on the other hand, let the big family to experience what we mongodb users need to pay attention to.
First of all, I declare that my English level is not too high, and some English translation into Chinese can not find suitable words to express, so the original English words may appear in the article, or the translation in some places will be a little blunt, that is to say, there will be literal translation. The main purpose of translating this book is for everyone to learn and explore. If there is any inaccuracy in translation, or if there is a more accurate translation, please point out that I will correct it in time. Thank you in advance.
Suggestions on Chapter 1 Application Design Tips application design
Tip#1.Duplicate data for speed,reference data for integrity (data redundancy is for performance, and referencing data is for integrity.)
Tip#2.Normalize if you need to future-proof data (if you want your data to serve technology that will not be out of date, please use reference structure)
Tip3#:Try to fetch data in a single query (try to use a query to get the required data)
Tip#4.Embed dependent fields (embed dependent fields)
Tip#5.Embed "point-in-tme" data (using embedded structure for data at a certain point in time)
Tip#6.Do not embed fields that have unbound growth (do not embed fields with unlimited growth)
Tip#7.Pre-populate anything you can (pre-fill what you can fill)
Tip#8.Preallocate space,whenever possible (some space can be allocated in advance whenever possible)
Tip9.Store embedded information in arrays for anonymous access (store generic information in an array using embedded structures)
Tip10.Design documents to be self-sufficient (designing documents to be self-sufficient)
Tip11.Prefer $- operators to JavaScript (using the $operator instead of javascript)
Tip#12.Compute aggregations as you go (calculate the amount of polymerization at any time in the course of use)
Tip#13.Write code to handle data integrity issue (using code to solve data integrity issues)
Suggestions on the implementation of Chapter 2 Implementation Tips
Tip#14.Use the correct types (use the correct data type)
Tip#15.Override _ id when you have your own simple,unique id (you can override the internal _ id when your data has a simple, unique primary key)
Tip#16.Avoid using a document for _ id (avoid using documents as the value of the _ id column)
Tip#17.Do not use database references (do not use database references)
Tip#18.Don't use GridFS for small binary data (do not use GridFS to store small binary data)
Tip#19.Handle "seamless" failover (handling seamless failure recovery)
Tip#20.Handle replica set failure and failover (handling the failure and recovery of replication sets)
Recommendations for Chapter 3 Optimization Tips optimization
Tip#21.Minimize disk access (minimizes access to the disk)
Tip#22.Use indexes to do more with less memory (through indexing to do more with less memory)
Tip#23.Don't always use an index (don't always use indexes)
Tip#24.Create indexes that cover your queries (the index created had better overwrite your query)
Tip#25.Use compound indexes to make multiple queries fast (using composite indexes to speed up queries)
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 276
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.