Don't search for entire document set of a collection on a new tab by default
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.
-
Elimar Ulisses commented
Would be nice to have a configuration where we can choose if we want to run the default fetch when selecting/opening a new collection. When using Mongo Compass with Atlas Data Federation i ended up having some trouble because it runned a query without setting any partition.