How can i improve my query speed in MongoDB, NodeJS?
I have one collection who include some value coming from sensor. My collection look like this. const MainSchema: Schema = new Schema( { deviceId: { type: mongoose.Types.ObjectId, required: true, ref: 'Device', }, sensorId: { type: mongoose.Types.ObjectId, default: null, ref: 'Sensor',…