I have 145359 Documents stored in a local MongoDB, which I am trying to index. To speed up my query.
{
"Categorized": true
}
Sample Document
{
"_id" : "dbe14c04-bd1e-454a-af57-4ca61566c0c0",
"Categorized" : true,
"Archived" : false,
"HasTorrent" : false,
"TorrentFile" : null,
"File" : {
"TitlePattern" : null,
"Extension" : ".mp4",
"FileName" : "A Costume for Nicholas (Un Disfraz para Nicolas) (2020) 1080p WEBRip.mp4",
"FileNameWithoutExtension" : "A Costume for Nicholas (Un Disfraz para Nicolas) (2020) 1080p WEBRip",
"AdapterName" : "CandyBD",
"AdapterNameLower" : "candybd",
"Type" : 1,
"SupportedISPs" : [
"dotinternet"
]
},
"IsSaved" : false,
"IsUpdated" : true,
"MovieId" : "tt8045396",
"Quality" : 16,
"UpdateComplete" : true,
"WatchCount" : 0,
"Is3D" : false,
"FileFoundDateTime" : ISODate("2022-01-03T02:12:03.236Z"),
"InformationDateTime" : ISODate("2022-01-03T02:12:11.553Z"),
"Dimension" : "1080p",
"IsDubbed" : false
}
The question is when trying to index the collection by
{
"Categorized" : 1
}
According to compass Documents Returned: 94057 and Documents Examined: 94057 from 145359 before indexing, great. But the thing is before indexing Actual Query Execution Time (ms):95 (around) and the CollScan Execution Time was 0-11 on average 4 ms. But after indexing Actual Query Execution Time (ms):124 Fetch was around 9 ms and Ixscan was around 5 ms.
What does this value mean and why does it look like my query took longer to execute after indexing?