'Sequelize blocking node event loop on large queries

Recently we've been noticing bad performance of our app, and using the blocked-at package found that Sequelize (v5.22) is blocking the node event loop on large queries.

The query in particular isn't complicated, just FooModel.findAll(someOptions), without any joins either. It's just that the result could be up to 100k rows.

Are there some known methods to improve performance, or at least ensure that the event loop won't be blocked?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source