title: Is there a shared query plan cache for Postgres?
body: <p>I have a complex postgres query that I've optimised with pg_hint_plan.  Planning time is about 150ms while query time is about 30ms.  The plan should never change, therefore there's no point in gathering statistics each any every time for each query.  The structural problem with the query is that it hits too many tables.</p>
  <p>Tweaking the join collapse limit and from select collapse limit has limited effect.</p>
  <p>Most 'enterprise' databases have a shared query cache, but as far as I can see Postgres does not.</p>
  <p>What are ways around this?  Prepared statements aren't really suitable as their lifetime is bound to the connection.</p>