logoalt Hacker News

hans_castorplast Wednesday at 11:46 AM2 repliesview on HN

Ah, didn't see the caching part.

Plans for prepared statements are cached though.


Replies

SigmundAlast Wednesday at 4:09 PM

Yes if the client manually prepares the statement it will be cached for just that connection because in PG a connection is a process, but it won't survive from one connection to the next even in same process.

Other databases like MSSQL have prepared statements but they are rarely used now days since plan caching based on query text was introduced decades ago.

AlisdairOlast Wednesday at 2:47 PM

Only on a per-connection basis