I used the below code to get data using aggregate to get 1 million records and its take around 45 seconds to 1 min and also if I make it just 1 it will be the same issue, with a