Skip to content

Conversation

shlomi-noach
Copy link
Contributor

Storyline: #454

In an attempt to speed up applying of binlog events, this is a low hanging fruit: set interpolateParams=true (doc)

This will set client-side prepared statements. The benefit to that is reduced round trips to the MySQL server: only one per query instead of three per query.

@shlomi-noach shlomi-noach temporarily deployed to production/mysql_role=ghost_testing July 25, 2017 06:25 Inactive
@@ -56,5 +56,5 @@ func (this *ConnectionConfig) GetDBUri(databaseName string) string {
// Wrap IPv6 literals in square brackets
hostname = fmt.Sprintf("[%s]", hostname)
}
return fmt.Sprintf("%s:%s@tcp(%s:%d)/%s?charset=utf8mb4,utf8,latin1", this.User, this.Password, hostname, this.Key.Port, databaseName)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to add unit tests to the db uri method?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arthurnn do you have something in mind? I'm happy for any and every test addition.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's merge that, I can work on these tests in a separate PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will only be merged after a few exhaustive days of testing in production (which is happening right now 😄 ).

@shlomi-noach
Copy link
Contributor Author

This is being tested for 8 days now in production with no issues. Will be merged shortly.

@shlomi-noach
Copy link
Contributor Author

ok, tested for 15 days straight, no problems.

@shlomi-noach shlomi-noach merged commit 3abf748 into master Aug 9, 2017
@shlomi-noach shlomi-noach deleted the interpolate-params branch August 9, 2017 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants