docs icon indicating copy to clipboard operation
docs copied to clipboard

Document url connection parameter `statement_cache_size`

Open Jolg42 opened this issue 3 years ago • 3 comments

Only found in rust source code as of today see: https://sourcegraph.com/search?q=context:global+repo:github.com/prisma/+statement_cache_size&patternType=literal

Example

postgresql:///localhost:5432/foo?statement_cache_size=420

Found from source code

PostgreSQL
//! - `statement_cache_size`, number of prepared statements kept cached.
//!   Defaults to 500. If `pgbouncer` mode is enabled, caching is always off.

MySQL
//! - `statement_cache_size`, number of prepared statements kept cached.
//!   Defaults to 1000. Set to 0 to disable caching.

So it seems it's only for MySQL and PostgreSQL with different defaults and can be disabled by setting it to 0

It should go there I think for a basic documentation https://www.prisma.io/docs/concepts/database-connectors/postgresql https://www.prisma.io/docs/concepts/database-connectors/mysql

@pimeys can you confirm the above? and if possible give more details about why it's important / why would someone want to increase / decrease / disable it?

Jolg42 avatar Jan 20 '22 10:01 Jolg42