简体   繁体   English

在 Firebase 实时数据库中,.indexOn 规则会增加数据库的容量吗?

[英]In Firebase Real Time database, will the .indexOn rule increase the volume of the database?

Based on this answer which states:基于这个答案,其中指出:

It creates some indexes ahead of time, but you need to tell it when you want to query with nested children with orderByChild orderByValue.它会提前创建一些索引,但是您需要在要使用 orderByChild orderByValue 查询嵌套子项时告诉它。

Does this mean that the DB multiplies the branch for each.indexOn rule added + 1?这是否意味着数据库为每个添加的 indexOn 规则乘以分支 + 1?

Lets say I have 3 Megs of data on branch A which is indexed by $key.假设我在分支 A 上有 3 兆数据,由 $key 索引。

If I use a rule:如果我使用规则:

"A": {".indexOn":["fieldA", "fieldB"]}

Now under the hood Firebase will Create a subbranch of A that will re-insert the indices already found on 'A' but this time under a the key defined in the.indexOn rule:现在在引擎盖下 Firebase 将创建 A 的一个子分支,它将重新插入已经在“A”上找到的索引,但这次是在 .indexOn 规则中定义的键下:

A--|
   |__rule_field_a
          |
          |_val_of_field_a_1 -> :value_a
          |
          |_val_of_field_a_2 -> :value_b
          |
          etc... etc...

This means that the 2 indexOn rules will multiple the volume of the branch from 3 to 9 Megs.这意味着 2 条 indexOn 规则将使分支的体积从 3 增加到 9 兆。

Is this correct?这个对吗?

Will this get reflected on the pricing?这会反映在定价上吗?

firebaser here炮兵在这里

Indexes that you define on the Firebase Realtime Database inside your security rules are not stored in your database itself, and you are not charged for them.您在安全规则内的 Firebase 实时数据库上定义的索引不会存储在您的数据库本身中,您无需为此付费。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM