changeStreamPreAndPostImages enabled是否存在性能问题?

huangapple go评论60阅读模式
英文:

Are there performance concerns with changeStreamPreAndPostImages enabled?

问题

启用带有文档前图像和后图像的更改流是否存在性能问题?

目前,我使用.watch()来监视insertupdated,我真的很想在deleted之前看到文档。

我已经使用Collection.findById()来获取关于已更新的文档的更多详细信息,所以我想知道前图像或后图像是否会对MongoDB服务器产生显着更大的负载?

英文:

Are there any performance concerns with enabling change streams with document pre-images and post-images.

Right now I use .watch() for insert and updated and I would really like to see the document before it's deleted.

I also already use Collection.findById() if I need more details about a document that has been updated so I'm wondering if pre-images or post-images will be a significantly larger load on the MongoDB server?

答案1

得分: 2

每次启用预映像后,对集合的每次更新都会伴随额外开销,因为将会向存储预映像的特殊集合添加一条记录。如果对集合的更新频率非常高,您可能会注意到一些影响。此外,带有预映像的集合会占用存储空间。从这个特殊集合中检索图像到更改流非常高效。

英文:

After enabling pre-image, each update to the collection comes with an overhead, as there will be a record added to the collection that stores pre-images. If the rate of updates to the collection is very high, you may notice some impact. Also the collection with pre-images is using storage space. Retrieveing an image into a change stream from this special collection is pretty efficient.

huangapple
  • 本文由 发表于 2023年2月24日 06:57:06
  • 转载请务必保留本文链接:https://go.coder-hub.com/75551148.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定