I am using the Firebase database in my Android application. Usually works fine. But as the database grows, query performance degrades. I added about 5 thousand records to the database (under the nodes "elk" and "su"), then I requested the database (on the nodes "cut" and "user"), but all requests are very, very slow. I defined the data index in the database rules, but it did not work. How can I solve this problem?
Here are my questions:
FirebaseDatabase.getInstance()
.getReference()
.child("user")
.child(userID)
.child("zones");
FirebaseDatabase.getInstance()
.getReference()
.child("cut")
.child(cutType)
.orderByChild("zoneID")
.equalTo(zoneID);


source
share