node-mysql2 icon indicating copy to clipboard operation
node-mysql2 copied to clipboard

How can I measure query `queue_wait` time?

Open erfanium opened this issue 1 year ago • 0 comments

How can I measure the time a query spends waiting in the connection pool queue when using the waitForConnections: true option in a connection pool?

I'm looking for to somehow do this:

const [result, meta] = await pool.query("SELECT * FROM ......")
console.lg(meta.queteWait) // if this value if bigger than 0, it means this query waited for a connection before being executed in mysql server.

erfanium avatar Aug 23 '24 12:08 erfanium