title: How to decide whether to store fields in indexes in RavenDB?
body: <p>In the RavenDB 3.x docs, there are multiple articles that touch on the concept of storing field values in indexes, so that transformers can fetch this data from the index itself rather than having to load the document.</p>
  <p>However, the exact implications of doing this are not mentioned and it's unclear to me in which situations that this is going to give benefits vs. too much overhead.</p>
  <p>The documentation basically says this about it:</p>
  <blockquote>
  <h2>Projections and Stored fields</h2>
  <p>If projection function only requires fields that are stored, then document will not be loaded from storage and all data will come from index directly. This can increase query performance (by the cost of disk space used) in many situations when whole document is not needed.</p>
  </blockquote>
  <p>(<a href="http://ravendb.net/docs/article-page/3.0/csharp/indexes/querying/projections" rel="nofollow noreferrer">Indexes/Querying/Projections</a> and more or less the same in <a href="http://ravendb.net/docs/article-page/3.0/csharp/indexes/storing-data-in-index" rel="nofollow noreferrer">indexes/storing data in indexes</a>)</p>
  <p>When reading I read it, it doesn't really feel worth looking in to, but when reading the <strong><a href="http://ravendb.net/docs/article-page/3.0/csharp/indexes/querying/basics#query-flow" rel="nofollow noreferrer">Query Flow</a></strong> I get more convinced about using this.</p>
  <p><strong>If I understand correctly, you could make queries not retrieve the document from storage at all, when using projection + indexes with storage, at the cost of disk space?</strong></p>
  <p>Assuming that is correct:</p>
  <ol>
  <li>Regarding the extra usage of disk space, <strong>how much can I expect? Can anyone stick some numbers on this?</strong></li>
  <li>How much more performant is this? How are these values stored in indexes anyway? How expensive is it to read that stored data vs. a stored document?</li>
  </ol>
  <p>What I think intuitively is, that if your document contains 10 numeric fields, and you store 4 of these in an index, you need roughly 40% more disk space? But you also need to read only 40% of your document when querying it using that index?</p>