optimized code with 100 pool connections