I am reading the docs and I wonder if I should add .indexOn
in the JSON tree under Rules in RealTime Database in order to improve the performance of the queries for child TimeStampBookingDate
The data will be read by the client(mobile app) using firebase Swift library.
I am a confused since in the docs it reads that:
"The realtime client libraries can execute ad-hoc queries without specifying indexes."
My Database is structured in this way
blvc-72e18
Users
2s8uH7sDwGbRdYwmXpGrRngmnUV2
cus_AQVJTpFX2LdkzL
282579602
BookingAmount: "63"
TimeStampBookingDate: "1491654600"
In order to improve query performance at child key TimeStampBookingDate
, should I edit the default rules in firebase as follows?
{
"rules": {
".read": "auth != null",
".write": "auth != null"
"Users": {
".indexOn":"TimeStampBookingDate"
}
}
}