且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Firestore存储大小限制了如何存储大型阵列

更新时间:2022-06-23 00:40:03

如果您担心数组的大小,则应该将每个项目从数组中拆分出来,并使其成为自己的文档.这是使用Firestore来存储大量单个项目的大规模扩展性的唯一方法.

If you're concerned about the size of an array, you should instead split each item out of the array and make it its own document. This is the only way you will achieve massive scalability with Firestore for storing many individual items.

是的,它将花费更多.可伸缩性是有代价的.

Yes, it will cost more. There is a cost to scalability.