On Thu, Dec 14, 2006 at 09:35:47AM -0800, Ben wrote:
> Interesting. Is that plan cached for the life of the session doing the
> inserts, the life of the trigger, or until the database is restarted?
Duration of a session, there is no support to cache a plan for any other
period.
Is it session level !!??? I think it is query level; don't we discard the plan after each query? AFAIK, only the plpgsql and other pl/ sisters cache the plan for the queries inside their code-blocks. I am under the impression that if a query is fired multiple times, it will be planned every time, unless we user PREPAREd stetements.
Please correct me if I am wrong.
> I guess I'm trying to figure out how to get the plan to re-cache, without
> making it entirely dynamic.
I don't think you can. Restarting the connection should be enough.
Have a ncie day,
--
Martijn van Oosterhout <kleptog@xxxxxxxxx > http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFFgZWEIB7bNG8LQkwRAkh9AJ9F1YmGTnmBt4iiKNUnkmlM+Xp9/QCffZpl
x4OxRMtBHmcWnTyl/bDFtbo=
=zs38
-----END PGP SIGNATURE-----
--
gurjeet[.singh]@ EnterpriseDB.com
singh.gurjeet@{ gmail | hotmail | yahoo }.com