shawty icon indicating copy to clipboard operation
shawty copied to clipboard

Only prepare statements once

Open snluu opened this issue 12 years ago • 0 comments

"This is a small optimization: you are preparing a SQL statement on each request, but it would be better if you prepare all your statements when you make your connection, then just use the prepared statement. Each Prepare call is a roundtrip to the database. See the source for details: http://code.google.com/p/go-mysql-driver/source/browse/mysql/connection.go"

snluu avatar Feb 10 '13 19:02 snluu