title: Cost efficiencies and scalability in firestore with reports
body: <p>In firestore sub-collections should be generated to save costs. In this case I intend to have a document for each user who registers and to go nesting the other data that I need from these. In this way, I will have only one reading per user who enters and the other information will be included in the sub-collections, according to the <a href="https://firebase.google.com/docs/firestore/data-model" rel="nofollow noreferrer">firestore documentation</a>.</p>
  <p>The future problem is the reports. If there are 100 users, if it is required to have a complete report with these, it would be 100 readings, when there are 50,000 users it will be the same. Additionally, although I do not know the topic of snapshots well, each of these will generate an additional cost for updates.</p>
  <p>I would like if someone can support me with suggestions or help me clarify this:</p>
  <ul>
  <li>Is it possible to have a main document that contains all the information and is this the one that is used for reports and for users get the data? That is, instead of having N documents for each user, have a single document &quot;maindoc&quot; and this would have subcollections with all the user data</li>
  </ul>
  <p><strong>Note:</strong> to complement solutions for reports such as data export to Bigquery and the API service, I do not consider them relevant since they also occupy N reads according to the number of documents</p>