Depending on the parameter to be tuned, there are the following ways to tune applications:
Specify in the keyword of the ConnectionString property
The following shows the parameters you can use for tuning by specifying in the keywords of the ConnectionString property:
Keyword | Explanation | Default value | Description |
---|---|---|---|
Connection Lifetime | Limits on connection retention | 15 | For specifying the retention time of the connection (in seconds), starting from the time of connection to the server and including the period the connection is to be retained in the connection pool. |
Pooling | Connection pool implementation | True | Specify whether to use connection pooling or not.
|
MaxPoolSize | Maximum number of pool connections | 20 | Maximum size of a connection pool. If there are more connections in the pool than this number, pooled connections are discarded when a connection is returned to the pool. |
MinPoolSize | Minimum number of pool connections | 1 | Minimum size of a connection pool. When you specify MinPoolSize, NpgsqlConnection will pre-allocate connections with the specified number of servers. |