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? Prepared statements are so that you can execute repetitive SQL commands which may only differ in parameter values for example. They are not meant to live "long" as a prepared statement may (they do if called