Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to measure query execution time in seqilize?

How can I calculate the execution time of a query Seqilize ORM?

  • There is a build in function that measures it?
  • How can I manage the running queries(PROCESS LIST)?
  • How do I know how many connections running?
like image 279
Roy G Avatar asked Sep 10 '18 15:09

Roy G


1 Answers

To print execution time of the query insert logging and benchmark options to it like that:

const game = await Game.findAll({
    benchmark: true,
    logging: console.log,
    <...>
}
like image 111
Ksenia Gulyaeva Avatar answered Nov 04 '22 11:11

Ksenia Gulyaeva