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

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.

1 Like


Were you able to solve this problem? Did indexing help?

thanks and Br

Yes, but only the queries related to the “_lastInform” attribute

I have added also added index (which should be here by deafult if you ask me) on _id.SerialNumber. This will increase performance of the web gui and some backend scripts.

Just for other to know if they will get to this kind of issue.

1 Like