title: Android: How can I optimize data fetching from firebase?
body: <p>I've following tree structure in firebase.
  <a href="https://i.stack.imgur.com/K7xYR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/K7xYR.png" alt="enter image description here"></a></p>
  
  <p>Now in AndroidStudio I want to fetch data from children of "en-US" (which in the current case are the nodes 1552040445614 and 1552040702223).</p>
  
  <p>When I only want values of keys "id" and "text2", so I've written a data model class in Java like this:</p>
  
  <pre><code>public class MyDataClass {
   public String id;
   public String text2;
  
   public MyDataClass() {
  
   }
  }
  </code></pre>
  
  <p>And I'm fetching data like this:</p>
  
  <pre><code>    ArrayList&lt;MyDataClass&gt; listDataClass = new ArrayList&lt;&gt;();
      mDatabase = FirebaseDatabase.getInstance().getReference().child("en-US");
      mDatabase.addChildEventListener(new ChildEventListener() {
          @Override
          public void onChildAdded(@NonNull DataSnapshot dataSnapshot, @Nullable String s) {
              MyDataClass myDataClass = datasnapshot.getValue(MyDataClass.class);
              listDataClass.add(myDataClass);
  
          }
  
          @Override
          public void onChildChanged(@NonNull DataSnapshot dataSnapshot, @Nullable String s) {
              // getContents(dataSnapshot);
          }
  
          @Override
          public void onChildRemoved(@NonNull DataSnapshot dataSnapshot) {
  
          }
  
          @Override
          public void onChildMoved(@NonNull DataSnapshot dataSnapshot, @Nullable String s) {
  
          }
  
          @Override
          public void onCancelled(@NonNull DatabaseError databaseError) {
  
          }
      });
  </code></pre>
  
  <p>Now the question is:
  Although I am only fetching values from keys "id" and "text2" from each child, there are other fields (like <strong>meta</strong>, listOfTexts1 etc.) also. Will these be also fetched in this query and consume from 10GB/month limit of free firebase account? If yes, then how can I optimize for only getting "id" and "text2" values?</p>
  
  <p>Thanks in advance.</p>