Question: I'm using the RavenDB streaming API to retrieve all 355,000 `DocsToProcess` from my database instance using the following code:

```
_myDocs = new List<DocsToProcess>();
var query = RavenSession.Query<DocsToProcess>();
using (var enumerator = RavenSession.Advanced.Stream(query))
{
    while (enumerator.MoveNext())
    {
        DocsToProcess u = enumerator.Current.Document;
        _myDocs.Add(u);
     }                
}

```

However, the following exception message is thrown:

`StreamQuery does not support querying dynamic indexes. It is designed to be used with large data-sets and is unlikely to return all data-set after 15 sec of indexing, like Query() does.`

How I can correctly iterate through all elements of type `DocsToProcess` in my C# application?

Answer: 
The [documentation says explicitly for unbound results](http://ravendb.net/docs/article-page/2.5/csharp/client-api/advanced/unbounded-results):

> 
> Important side notes:
> 
> 
> * the index already exists. Creation of a index won't occur and the query error with an IndexDoesNotExistsException exception.
> 
> 
> 

And that's what your exception is saying. You have to create a [static index](http://ravendb.net/docs/article-page/2.5/csharp/client-api/querying/static-indexes/defining-static-index) for streaming results.
Similar to [JHo](https://stackoverflow.com/users/2001845/jho) above, the solution that I came up with means that you do not need to make a static index for streaming, because you're relying on the default index and using the `StartsWith` overload of `Stream<T>` in the Raven client.

We've found the solution below to work fine for most of our use-cases where we need to get *everything* from a Raven instance.

```
public IEnumerable<T> GetAll()
{
    var results = new List<T>();

    var conventions = _documentStore.Conventions ?? new DocumentConvention();
    var defaultIndexStartsWith = conventions.GetTypeTagName(typeof(T));

    using(var session = _documentStore.OpenSession())
    {
        using(var enumerator = session.Advanced.Stream<T>(defaultIndexStartsWith))
        {
            while(enumerator.MoveNext())
                results.Add(enumerator.Current.Document);
        }
    }

    return results;
}

```