Remix.run Logo
hans_castorp 5 hours ago

> and it has no way to serialize a query plan to some form that can be shared between processes

https://www.postgresql.org/docs/current/parallel-query.html

"PostgreSQL can devise query plans that can leverage multiple CPUs in order to answer queries faster."

SigmundA 5 hours ago | parent [-]

Nothing to do with plan caching, thats just talking about plan execution of parallel operations which is that thread or process based in PG?

If process based then they can send small parts of plan across processes.

hans_castorp 5 hours ago | parent [-]

Ah, didn't see the caching part.

Plans for prepared statements are cached though.

SigmundA 34 minutes ago | parent | next [-]

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.

AlisdairO 2 hours ago | parent | prev [-]

Only on a per-connection basis