Fix bugs.
Use connection pool and query without prepare.