Closed surki closed 5 years ago
If we don't implement QueryerContext or Queryer interface for connection, db.Query() will always do statement "prepare" and statement "exec". These extra roundtrips can add unneeded latency.
Run this test program and check in wireshark: https://play.golang.org/p/wvmsGliLPpz
A change like this fixes this: https://github.com/surki/sqlhooks/commit/98e9bd8ddee254ae4ae9ad8058c37e993ec097d8
I could send a PR if you would like this fixed here
Cool, please open the PR
If we don't implement QueryerContext or Queryer interface for connection, db.Query() will always do statement "prepare" and statement "exec". These extra roundtrips can add unneeded latency.
Run this test program and check in wireshark: https://play.golang.org/p/wvmsGliLPpz
A change like this fixes this: https://github.com/surki/sqlhooks/commit/98e9bd8ddee254ae4ae9ad8058c37e993ec097d8
I could send a PR if you would like this fixed here