Skip to content
代码片段 群组 项目
未验证 提交 003ff709 编辑于 作者: Dylan Griffith's avatar Dylan Griffith 提交者: Amy Qualls
浏览文件

Add database_reviews docs section describing final query plans

This comes up all the time in code review and having it spelled out more
clearly in the docs may make it easier for newer contributors to know
about this requirement. Currently it's only vaguely described on this page.
上级 f0f57693
No related branches found
No related tags found
无相关合并请求
......@@ -193,6 +193,13 @@ Include in the MR description:
plan _before_ and _after_ the change. This helps spot differences quickly.
- Include data that shows the performance improvement, preferably in
the form of a benchmark.
- When evaluating a query plan, we need the final query to be
executed against the database. We don't need to analyze the intermediate
queries returned as `ActiveRecord::Relation` from finders and scopes.
PostgreSQL query plans are dependent on all the final parameters,
including limits and other things that may be added before final execution.
One way to be sure of the actual query executed is to check
`log/development.log`.
#### Preparation when adding foreign keys to existing tables
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册