title: Additional Firebase Reads
body: <p>I have a firestore query which in my case should read 'n' documents. However it always ends up reading &quot;n x 2&quot; documents.</p>
  <p>Have experienced the same problem while reading collection once or on using a snapshot listner.</p>
  <p>Any thoughts on why and how to prevent such reads.</p>
  <pre><code> datastore.collection(&quot;PlatformData/CollatedData/Inventory&quot;).get().then((querySnapshot) =&gt; {
          console.log(querySnapshot)
          querySnapshot.forEach((doc) =&gt; {
           //doc.data() is never undefined for query doc snapshots
           console.log(doc.id, &quot; =&gt; &quot;, doc.data());
          });
     });
  
  </code></pre>
  <p>On further trials, I observed that</p>
  <pre><code>datastore.collection(&quot;PlatformData&quot;).doc(&quot;CollatedData&quot;).collection(&quot;Inventory&quot;).get().then((snapshot) =&gt; { console.log(snapshot) });
  </code></pre>
  <p>although being the method provided in firebase docs reads documents n x 2 times while as</p>
  <pre><code>datastore.collection(&quot;PlatformData&quot;).doc(&quot;CollatedData&quot;).collection(&quot;Inventory&quot;).get();
  </code></pre>
  <p>reads the documents n times.</p>