提交 c5e083af 编写于 作者: S schneems

[ci skip] document `statement_limit`

Per discussion at https://github.com/rails/rails/issues/14645#issuecomment-40499409
上级 b415390a
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册