How to efficiently query `findAll () `with spring-data-mongodb?

question

    In
  • business, all tables in the database need to be queried and statistically analyzed and shown in the echats figure. The previous data is fine when the data is small, and the cache can barely support the column
  • .
  • now there is nearly 1 million data in the database. As a result, the execution time of findAll () is slow, which takes about 3 minutes
  • .
  • are there any other ideas to implement this business
I hope you bosses can give us some advice!

hitting the index is the basic principle of database usage. I don't know what kind of query has been executed, so there is no way to optimize it for you.

Menu