When I want to search for documents of a collection I select the collection on the left pane and then a new tab is opened, that shows information as seen in picture `big-collection.png`.
However, the problem with this default configuration is that is searches for the entire document set to display the information `Displaying documents 1-20 of 1183373`. The executed query is:
{code}
{
"appName": "MongoDB Compass",
"command": {
"aggregate": "progress",
"pipeline": [
{
"$match": {}
},
{
"$skip": 0
},
{
"$group": {
"_id": 1,
"n": {
"$sum": 1
}
}
}
],
"hint": "_id_",
"cursor": {},
"maxTimeMS": 5000,
...
{code}
This query already takes >500ms to be executed and once we grow our dataset even larger this is going to be a big problem performance wise.
We want to see how many documents there are in the collections but on a new tab page it is completely enough by default to show only 20 documents and either do a lazy loading of further pages or only display the total number of documents in the overview line. If we want to search for more documents we can still do this manually afterwards. On the new tab load the entire document set simply should not be collected.