Re: to prepare_cached or not?

"Greg Sabino Mullane" <greg-738XdyZ4GzZWk0Htik3J/[email protected]>
Newsgroups gmane.comp.db.postgresql.dbdpg
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160


> I have a bunch of queries which are not extremely performance sensitive. 
> What is the trade-off between prepare and prepare_cached? Is 
> prepare_cached basically free and I should use it all the time? Or is 
> there a significant memory cost and I should only use it for the most 
> time-critical queries?

No significant memory or computation cost. It's a fairly cheap optimization. 
It's probably fine to use it all you want. Personally, I rarely use it myself, 
as my apps prepare things only once and keep pretty good track of what's 
already been prepared or not.

- --
Greg Sabino Mullane greg-738XdyZ4GzZWk0Htik3J/[email protected]
End Point Corporation
PGP Key: 0x14964AC8 200706141712
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iD8DBQFGca96vJuQZxSWSsgRAxNoAKCdbFo7DWOFU0vfUIpMROnuTKCUdgCfeg2t
nDzg2czCSe7M+d8dshE6MsI=
=/xhh
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.