How frequent are ping() / is_valid() called in Connection #3072
-
Hi I've been using rust/diesel to talk to cockroachdb. I've noticed one type of queries are way higher or more frequent from cockroachdb side The I'm wondering where is_valid() method called since I can't search anything for it. I hope to find some clue/tips to reduce that query. Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
This query is executed by the r2d2 connection pool every time you checkout an connection from the pool. It is used to check if the connection still works.
|
Beta Was this translation helpful? Give feedback.
-
That is very help. Thank you! @weiznich |
Beta Was this translation helpful? Give feedback.
This query is executed by the r2d2 connection pool every time you checkout an connection from the pool. It is used to check if the connection still works.
You can reduce the number of times this query is executed by: