Optimizing query performance

As my database is increasing I’m noticing a slower performance in querying through the listing devices page. The default query took 8 seconds to complete.

Looking at the database console I found that there are no indexes (except _id) to the devices collection.

I tested creating an index do the _timestamps filed
image

Now the default query took only 0.12s.

Similar indexes could be added to other filter conditions.

Do you think adding those indexes by default would be a good idea. Updating the “_timestamps” attribute might have a sightly performance impact since it frequently updated. The other filter conditions not so since they do not change that often.