mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
[ci skip] document statement_limit
Per discussion at https://github.com/rails/rails/issues/14645#issuecomment-40499409
This commit is contained in:
parent
b415390ad6
commit
c5e083af3d
1 changed files with 11 additions and 1 deletions
|
@ -646,7 +646,7 @@ development:
|
|||
pool: 5
|
||||
```
|
||||
|
||||
Prepared Statements can be disabled thus:
|
||||
Prepared Statements are enabled by default on PostgreSQL. You can be disable prepared statements by setting `prepared_statements` to `false`:
|
||||
|
||||
```yaml
|
||||
production:
|
||||
|
@ -654,6 +654,16 @@ production:
|
|||
prepared_statements: false
|
||||
```
|
||||
|
||||
If enabled, Active Record will create up to `1000` prepared statements per database connection by default. To modify this behavior you can set `statement_limit` to a different value:
|
||||
|
||||
```
|
||||
production:
|
||||
adapter: postgresql
|
||||
statement_limit: 200
|
||||
```
|
||||
|
||||
The more prepared statements in use: the more memory your database will require. If your PostgreSQL database is hitting memory limits, try lowering `statement_limit` or disabling prepared statements.
|
||||
|
||||
#### Configuring an SQLite3 Database for JRuby Platform
|
||||
|
||||
If you choose to use SQLite3 and are using JRuby, your `config/database.yml` will look a little different. Here's the development section:
|
||||
|
|
Loading…
Reference in a new issue