Reserve 600 bytes for error message.
Use interger type as map key.
Disable unsupported status type error message.
Get rid of mutex.

Use blocking connect().
Check diff between map and unordered_map.
Reuse database connector.
Generate debug info in release build for profiling.
Replace string operator+ with +=
Use ostringstream rather than stringstream