large json download optimization

Now, the query result is returned steamed in chunks.