I am getting performance issue with this aggregation pipeline?This almost takes 20 sec to give response of 30000 records

Remove the write concern from the connection string and try again