node-mysql2
node-mysql2 copied to clipboard
How can I measure query `queue_wait` time?
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.