I got a Collection with following structre
_id : 641c2844904d1c6a6e8985a6
PortalId:123,
ContactId :1,
SelectionId:1,
SelectionName:"TEST",
SelectionCategory:"cat",
SelectionCategoryId:1,
DateCreated:2023-03-23T10:21:55.578+00:00
CreatedBy: "test"
I have to query against this collection based on various scenarios
Sometimes query against just 1 filter PortalId
Sometimes query against just 1 filter ContactId
Sometimes query against 1 filter SelectionId
Sometimes query against 2 filtes ContactId & SelectionId
Is it recommended to create a single compound index with columns ContactId & SelectionId and 1 index for PortalId or 3 individual index seperatly [ PortalId , ContactId & SelectionId ]
Will the the read performance affect much if we are creating just the compound index as the size of data grows?