Home > Database > Mysql Tutorial > 【MongoDB】MongoDB之遗漏知识点

【MongoDB】MongoDB之遗漏知识点

WBOY
Release: 2016-06-07 16:12:17
Original
1593 people have browsed it

截止目前,已经看过mongodb书籍三本了,今天看由美国 Kristina Chodorow著《MongoDB 权威指南》时候,发现还是有许多知识有遗漏;现在做个补充; 一、删除速度 删除文档通常很快,但是如果清空整个集合比较慢,那么使用drop直接删除集合会快; 现在创建多于1

截止目前,已经看过mongodb书籍三本了,今天看由美国 Kristina Chodorow著《MongoDB 权威指南》时候,发现还是有许多知识有遗漏;现在做个补充;

一、删除速度

删除文档通常很快,但是如果清空整个集合比较慢,那么使用drop直接删除集合会快;

现在创建多于10w的测试记录:

\

\

\

注意用db.tester.drZ喎?http://www.2cto.com/kf/ware/vc/" target="_blank" class="keylink">vcKOoo6m0+szmcmVtb3Zlus1maW5kb25lo6zL2bbIzOHJ/cHLtavKx9PQtPq827XEo6yyu8Tc1ri2qMjOus6y6dGvzPW8/qOs1fu49ryvus+2vLG7yb2z/cHLo6zL+dPQ1KrK/b7dtryyu7z7wcuhoyBSZW1vdmW688v30v3V4tCptryyu7Hko7s8L3A+CjxoMz62/qGit7W72Mr91+nUqsvYPC9oMz4KPHA+yOe5+9aqtcDUqsvYtcTPwrHqo6zEx8O008OhsCRzbGljZaGxt8ezo9PQ08Oho7Wr09DKsc7Sw8fPo837t7W72NPrsunRr8z1vP7P4MalxeS1xMjOus7Su7j2yv3X6dSqy9iho7P1yry7r9K7zPW8x8K8o6zLtcP30rvPwnNsaWNltcTTw7eoo7o8L3A+CjxwPjxpbWcgc3JjPQ=="http://www.2cto.com/uploadfile/Collfiles/20141215/2014121510033646.png" alt="\">

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template