问题标签 [mongodb-3.6]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
mongodb - 使用 _ID 作为外键的 MongoDb 3.6 查找
我使用查找“productdata”从“udatas”模式中获取数据。我怀疑这适用于 mongodb 4.x,但不适用于 3.6。有任何想法吗?
Udata 模式
这是“产品”模式
这个我试过了,但是我得到的是空产品?
提前致谢
yaml - MongoDB Error parsing YAML Config 副本集的非法映射值
这是我的 /etc/mongodb.conf - 使用 MongoDB 3.6。我在启动 mongod 时遇到了正在解析的配置文件的挑战。我在每个冒号后有一个空格,在每个新行上有两个空格我从这里的 mongoDB 文档中获取了副本集示例:https ://docs.mongodb.com/manual/reference/configuration-options/#replication-options
错误是:
我发送的命令是
尝试“mongod --help”以获取更多信息
mongodb - How to increase a date field with one second value in a MongoDB 3.6?
MongoDB scripting is still pretty cryptic to me, and stuck with this problem on a 3.6 server lacking the fancier operators from 4.2.
How to increase a date field with one second value in a MongoDB 3.6?
For example, I'd like to do something like this:
…will set the value to the text $updatedAt1
which is cute.
Other cute errors are thrown when using updatedAt
without quotes or without the $ prefix.
More generically, is there a way to reuse current values with update … $set
?
mongodb - 为什么 mongodb 的存储大小在辅助服务器上比在主服务器上大?
我不明白为什么辅助服务器上的存储大小比主服务器上的大得多(450 GB 对 375 GB)。
- 硬件、操作系统、文件系统和 mongodb 配置在主要和次要上是相同的
- 存储引擎是有线老虎
- 每天都会创建一个新数据库,其中存储当天的历史数据
- 保留最后 14 天(数据库)
- 最旧的数据库在一天之后被删除
- 文档永远不会更新或删除,它们只会被插入和读取
- 过去没有初级/次级开关
正如您在集合统计中看到的那样,主要count
和avgObjectSize
次要之间是相同的,但storageSize
有所不同。为什么会这样?可以修复(如何)?
相对: