title: Firebase: Best practice to build a data structure that can filter data by multiple criteria quickly
body: <p>For example, I have a list of 1.000.000 users, the data look like this:</p>
  
  <pre><code>users: {
    $userId: {
      name: "",
      sex: "",
      age: "",
      city: "",
      maritalStatus: "",
      // can be more
    }
  }
  </code></pre>
  
  <p>I want to <strong>filter</strong>, <strong>paginate</strong> the data for: users who are single, male, with age &lt; 30, living in city X.</p>
  
  <p>Is there a good practice to make this kind of queries less painful?</p>