Search Postgresql Archives

Re: How to restore a Plan from a stored plan text?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



sunpeng <bluevaley@xxxxxxxxx> writes:
> Thanks for your help!The motivation is that I try to find the most used sub
> plan ,and cach the sub plan's execution result and  store sub plan itself on
> disk. Even the sub plan's connection is closed, the consequent connection
> with the same sub plan could utilize the stored cached result.

This is not particularly a good idea, at least not without a whole lot
of *other* infrastructure.  How will you know if the plan has been
obsoleted by table changes?  Even without considering that, how will you
know when the cached result is obsoleted by data changes?

You might want to consult the PG archives for previous discussions about
shared plan caches.  I think the previous proposals involved keeping
things in shared memory not on disk, but they otherwise had many of the
same problems as this.  There have also been periodic discussions about
caching function execution results, which also seems closely related.

			regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux