db.salesRecords.find({"productId": 15}).sort({"saleDate": -1, "quantity": 1})
and
db.salesRecords.find({"saleDate": {"$gte": ISODate("2023-06-01")}}).sort({"productId": 1, "quantity": -1})
which indexing strategy would be most effective in improving response times for both queries?
© Copyrights DumpsEngine 2025. All Rights Reserved
We use cookies to ensure your best experience. So we hope you are happy to receive all cookies on the DumpsEngine.