Descriptiondatabase/sql: Avoid re-preparing statements when all connections are busy
Previously, if all connections were busy, we would always
re-prepare the statement on the connection we were assigned from
the pool. That meant that if all connections were busy most of the
time, the number of prepared statements for each connection would
keep increasing over time.
Instead, after getting a free connection, check to see if the
statement has already been prepared on it, and reuse the statement
handle if so.
Patch Set 1 #Patch Set 2 : diff -r f749e3111252 https://code.google.com/p/go #Patch Set 3 : diff -r f749e3111252 https://code.google.com/p/go #Patch Set 4 : diff -r e1d0077340e8 https://code.google.com/p/go #
Total comments: 4
Patch Set 5 : diff -r 277f98d885558a00e899f6e89958e97470fd8ab4 https://code.google.com/p/go #Patch Set 6 : diff -r c31e69cab80bd1ef8dd17b8269a8c108c167b516 https://code.google.com/p/go #
Total comments: 1
MessagesTotal messages: 13
|