当前位置:网站首页>什么情况下应该使用GridFS?
什么情况下应该使用GridFS?
2022-06-24 08:12:00 【黄佳俊、】
对于MongoDB collection下的文档而言,在文件大于16MB时,我们应该使用GridFS。
在一些解决方案中,使用MongoDB的GridFS存储大文件,比使用系统级别的文件系统更便利。
.当文件系统的目录对文件数量有限制时,你应该使用GridFS来存储需要的尽可能多的文件;
.当你想让你的文件和元数据在多个系统和设施之间自动同步和部署时。使用地理上分布的副本集(geographically distributed replica sets),MongoDB可以自动地分发文件和元数据到多个mongo实例和设施上。
.当你想访问大文件的部分信息,而又不想把整个文件加载到内存时,你可以使用GridFS调回部分文件,而不用把整个文件读入到内存。如果你需要自动的更新文件的整个内容,不要使用GridFS.作为替代,你可以存储文件的多个版本,并且在元数据中指定文件的当前版本。在上传新版本的文件后,你可以以原子更新来更新表示为"latest"的元数据字段,如果需要的话,你可以删除以前的版本。
边栏推荐
- Mba-day25 best value problem - application problem
- tp5 使用post接收数组数据时报variable type error: array错误的解决方法
- P6117-[joi 2019 final] greedy
- Weekly recommended short video: is the ultimate form of computing "meta universe"?
- 【gdb调试工具】| 如何在多线程、多进程以及正在运行的程序下调试
- Microblog writing - flow chart - sequence chart - Gantt chart - Mermaid flow chart - good results
- [noi Simulation Competition] send (tree DP)
- [ES6 breakthrough] promise is comparable to native custom encapsulation (10000 words)
- 2022-06-23: given a nonnegative array, select any number to make the maximum cumulative sum a multiple of 7, and return the maximum cumulative sum. N is larger, to the 5th power of 10. From meituan. 3
- Jincang KFS replicator installation (oracle-kes)
猜你喜欢
Event registration Apache pulsar x kubesphere online meetup hot registration
Depens:*** but it is not going to be installed
2022-06-23: given a nonnegative array, select any number to make the maximum cumulative sum a multiple of 7, and return the maximum cumulative sum. N is larger, to the 5th power of 10. From meituan. 3
Numpy NP in numpy c_ And np r_ Explain in detail
小白学习MySQL - 增量统计SQL的需求
普通人没有学历,自学编程可以月入过万吗?
Zero foundation self-study SQL course | sub query
【ES6闯关】Promise堪比原生的自定义封装(万字)
Support vector machine (SVC, nusvc, linearsvc)
Target detection series fast r-cnn
随机推荐
【Redis实现秒杀业务①】秒杀流程概述|基本业务实现
When programmers are asked if they can repair computers... | daily anecdotes
Threejs glow channel 01 (unrealbroompass & layers)
P6698-[BalticOI 2020 Day2]病毒【AC自动机,dp,SPFA】
Weekly recommended short video: is the ultimate form of computing "meta universe"?
cookie加密 4 rpc方法确定cookie加密
[Niuke] length of the last word of HJ1 string
可直接套用的Go编码规范
Linux MySQL installation
Leetcode-- string
Learn Tai Chi Maker - esp8226 (12) esp8266 multitasking
php文件锁
leetcode--字符串
Rpiplay implementation of raspberry pie airplay projector
目标检测系列——Fast R-CNN
PHP使用递归和非递归方式实现创建多级文件夹
NETRCA: AN EFFECTIVE NETWORK FAULT CAUSE LOCALIZATION之论文阅读
ApplicationContextInitializer的三种使用方法
正则匹配邮箱
Get post: do you really know the difference between requests??????