Skip to content

Commit

Permalink
feat: add default value
Browse files Browse the repository at this point in the history
  • Loading branch information
ankur-arch committed Dec 4, 2024
1 parent 1490035 commit a58538b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content/200-orm/050-overview/500-databases/300-postgresql.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ The following arguments can be used:
| `host` | No | | Points to a directory that contains a socket to be used for the connection |
| `socket_timeout` | No | | Maximum number of seconds to wait until a single query terminates |
| `pgbouncer` | No | `false` | Configure the Engine to [enable PgBouncer compatibility mode](/orm/prisma-client/setup-and-configuration/databases-connections/pgbouncer) |
| `statement_cache_size` | No | `500` | Since 2.1.0: Specifies the number of [prepared statements](#prepared-statement-caching) cached per connection |
| `statement_cache_size` | No | `100` | Since 2.1.0: Specifies the number of [prepared statements](#prepared-statement-caching) cached per connection |
| `application_name` | No | | Since 3.3.0: Specifies a value for the application_name configuration parameter |
| `channel_binding` | No | `prefer` | Since 4.8.0: Specifies a value for the channel_binding configuration parameter |
| `options` | No | | Since 3.8.0: Specifies command line options to send to the server at connection start |
Expand Down Expand Up @@ -305,6 +305,6 @@ The two queries after parameterization will be the same, and the second query ca
SELECT * FROM user WHERE name = $1
```

Every database connection maintained by Prisma Client has a separate cache for storing prepared statements. The size of this cache can be tweaked with the `statement_cache_size` parameter in the connection string. By default, Prisma Client caches 500 statements per connection.
Every database connection maintained by Prisma Client has a separate cache for storing prepared statements. The size of this cache can be tweaked with the `statement_cache_size` parameter in the connection string. By default, Prisma Client caches `100` statements per connection.

Due to the nature of pgBouncer, if the `pgbouncer` parameter is set to `true`, the prepared statement cache is automatically disabled for that connection.

0 comments on commit a58538b

Please sign in to comment.