I was wondering.... When is a PREPARE statement planned? On first
execution? At the time the PREPARE statement is called?
How does the planner decide what sorts of plans to use when the ideal
plan might change based on future runs?
Is this the same wrt PLPGSQL cached plans? Or are they planned differently?