Optimize connection