首页 > 解决方案 > How long it usually takes for Firebase Firestore to cost money?

问题描述

I got an app, where I load Data from Cloud Firestore, and I load the data every time, someone opens the page.

Now I saw that my reading Process gets really high, and I am only one user.

I hope someone can tell me how long it usually takes for firebase to cost money.

It would also be cool to know, on what I have to focus while working with Cloud Firestore.

The last Question I have, is about the way I load my data, I am very new to coding in general and I have no Clue, about how you normally load data. I just did it this way because it worked. Is it normal to load the data every time you open the page, or should the data only be loaded the first time you open the app.

标签: firebasegoogle-cloud-firestore

解决方案


加载数据的方式取决于应用程序的要求。如果您想要一个更实时同步的应用程序,那么每次运行时加载都很重要。如果您正在查询的数据不会像配置文件数据那样经常更改,那么存储在本地系统中将大大降低成本。

有关定价,请参阅文档。您可以执行 50K/天的文档读取,这在开发过程中绰绰有余。

至于编码风格,在初始阶段,只是一般的编码。应用开发完成后,优化代码。不需要实时数据的地方可以替换为一次性读取代码或数据的本地副本。这说明了很多成本。

这个答案讨论了如何在使用实时数据库时降低成本。它也可以在 Cloud Firestore 上实现。如何降低firebase实时数据库下载成本?


推荐阅读