Go sql - prepared statement scope
问题 I'm building an API using the Go (1.6.x) sql package along with with PostGres (9.4). Should my prepared statements have application or request scope? Having read the docs it would seem more efficient to scope them at the application level to reduce the number of preparation phases. However, perhaps there are other considerations and prepared statements are not designed to live that long? 回答1: Prepared statements are so that you can execute repetitive SQL commands which may only differ in