I'm curious under what circumstances Postgres will cache an execution
plan for a query.
Obviously if you create it with the PREPARE statement, it will be cached..
However, if I just run an ad-hoc query such as:
select * from Foo where X < 5;
A few hundred times, will that be cached? What if I run:
select * from Foo where X < :value;
Can that be cached, or will it always be re-evaluated based on the
value of :value? Thanks!
Mike