Heikki Linnakangas wrote:
> I've been working on a patch to add a little cache to SubPlans, to speed
> up queries with correlated subqueries, where the same subquery is
> currently executed multiple times with the same parameters. The idea is
> to cache the result of the subplan, with the correlation vars as the
> cache key.
I like the idea.
I think the cache should be limited in size, perhaps by work_mem.
Also, there probably should be a GUC for this, defaulting to "off".
Yours,
Laurenz Albe