How to stop execution of particular query?

Expected behavior

I want to stop the execution of the particular query.

Please describe here the behavior you are expecting.

Actual behavior

What is the current behavior?
There is one table that has millions of records. Now when I go to that particular table it executes COUNT ALL query every time. This query in our case takes a very long time(15-25mins) to execute and we don’t want that.

Please provide any relevant information about your setup.

  • Package Version:
  • Express Version:4.16.2
  • Sequelize Version:4.37.10
  • Database Dialect: postgress
  • Database Version: 12.0
  • Project Name: Impact-app

Hello @nishant_khandelwal,

I’m happy to see you around :smiley:

Would that be possible for you to override the count route for this collection?
Go in your routes folder et find the file related to your collection, you will see something like:

// Get a number of MyCollection
router.get('/mycollection/count', permissionMiddlewareCreator.list(), (request, response, next) => {
  // Learn what this route does here:

You can override this route for answering your needs.

Tell me if it helps :wink: