-1

1.How to much users can be support by Firebase database (in number).

For example:

   Firebase_Database:{
         "USERS":{
           +....DSFYSDFYDSUFYDUSF(USER_01)
           +....SDFDSFDSUY887867I(USER_02)
           .
           .
           .
           .
           +... n
           +... n+1

    }

}

UPTO how much users can easily access data.

my doubt is if one parent node(USERS): contain 100 million records (users of)

and if they access there data it will take time? or any way to divide those users data records to be store based on there country, To increase the performance of the realtimedatabase access speed.

please reply to me.

2.if database size goes upto 10TB. Then what happened?

Peter Haddad
  • 78,874
  • 25
  • 140
  • 134
Thofiq Ahmed
  • 205
  • 2
  • 14

1 Answers1

2

Check this link to know all the limits for the Firebase database:

https://firebase.google.com/docs/database/usage/limits

But according to the link it says, that you can have 75 million nodes.

Total nodes in a path with listeners or queries on it is 75 million*

You can't listen to or query paths with more than 75 million nodes, cumulative. However, you can still listen to or query child nodes. Try drilling down deeper into the path or creating separate listeners or queries for more specific portions of the path.

*You can't view paths with more than 30,000 total nodes from the data viewer in the Firebase console.

Regarding "time"(how much it will take for users to access data), it all depends on how you do your queries. Example instead of looping in the whole node to get the data, you can just specify the user so you do not need to loop.

Another example is to use addListenerForSingleValueEvent instead of ValueEventListener as it reads data once.

Example retrieving data of a user, can do this:

DatabaseReference ref = FirebaseDatabase.getInstance().getReference("Student");
String uid = FirebaseAuthentication.getInstance().getCurrentUser().getUid();
ref.child(uid).addListenerForSingleValueEvent(new ValueEventListener() {
     @Override
 public void onDataChange(DataSnapshot dataSnapshot) { 
    String name=dataSnapshot.child("name").getValue().toString(); 
    
  }

    @Override
public void onCancelled(FirebaseError firebaseError) {
   }
});
Community
  • 1
  • 1
Peter Haddad
  • 78,874
  • 25
  • 140
  • 134