There are situations that require you to turn off IntelliShell’s Query Assist in Studio 3T. As we have noted in previous articles this can put a number of limitations on how you can interact with the resulting data.
The biggest issue however, is the limitation of un-assisted queries only being able to show the first set of results that Mongo’s shells return. The MongoDB engineers limited the results to 20 documents by default, and thus you can only see up to 20 results in the Studio 3T table.
Take this query on our example customers collection:
This will only return the first 20 customers.
Adjusting the number of results retrieved
But, we can tell the underlying Mongo shell that it should display more than 20 items. That is controlled by the
DBQuery.shellBatchSize variable. If we set it to our required page size, we can then view that many results.
Let’s prefix our find with:
Now, the find will return and display 200 results in one page.
Do note that this is not paged or downloaded on demand as a query assisted query. You should therefore be aware of how much memory and network you may be use as you select a batch size for un-assisted queries.
Setting the number of results displayed
You will also find that the number of results displayed in a page is limited to 50 by default. That’s easy to change in Preferences.
The shellBatchSize will still determine the maximum number of documents retrieved. Studio 3T will discard any documents over the Initial page size setting. For simplicity, consider synchronizing the two values when setting them.
Ideally, you should be able to use Query Assist in all circumstances. We are working hard to remove those times when you can’t. But when you can’t we hope this tip will allow you to see a lot more of your data in the Studio 3T JSON, Tree or Table views.