From 0d861414045f98a1872e6ca981b504ad4550d173 Mon Sep 17 00:00:00 2001 From: Tim Deeb-Swihart Date: Thu, 15 Feb 2024 16:28:15 -0800 Subject: [PATCH] mysql: interpolate parameters by default This cuts our queries down to 1 round-trip to the database per operation. When interpolateParams is false (the default) the mysql driver will call prepare before executing a query. --- common/persistence/sql/sqlplugin/mysql/session/session.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/persistence/sql/sqlplugin/mysql/session/session.go b/common/persistence/sql/sqlplugin/mysql/session/session.go index b9490d5043cf..eb6af950afaa 100644 --- a/common/persistence/sql/sqlplugin/mysql/session/session.go +++ b/common/persistence/sql/sqlplugin/mysql/session/session.go @@ -51,8 +51,9 @@ const ( ) var dsnAttrOverrides = map[string]string{ - "parseTime": "true", - "clientFoundRows": "true", + "parseTime": "true", + "clientFoundRows": "true", + "interpolateParams": "true", } type Session struct {