Commit 0b562014 authored by Russell Dickenson's avatar Russell Dickenson

Merge branch '220193-add-optimizattion-suggestions-to-telemetry-docs' into 'master'

Add query optimization examples in Telemetry guide

See merge request gitlab-org/gitlab!37190
parents c00c10ed eaa560b5
...@@ -313,10 +313,11 @@ In order to have an understanding of the query's execution we add in the MR desc ...@@ -313,10 +313,11 @@ In order to have an understanding of the query's execution we add in the MR desc
We also use `#database-lab` and [explain.depesz.com](https://explain.depesz.com/). For more details, see the [database review guide](../database_review.md#preparation-when-adding-or-modifying-queries). We also use `#database-lab` and [explain.depesz.com](https://explain.depesz.com/). For more details, see the [database review guide](../database_review.md#preparation-when-adding-or-modifying-queries).
Examples of query optimization work: #### Optimization recommendations and examples
- [Example 1](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/26445) - Use specialized indexes [example 1](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/26871), [example 2](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/26445).
- [Example 2](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/26871) - Use defined `start` and `finish`, and simple queries, because these values can be memoized and reused, [example](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/37155).
- Avoid joins and write the queries as simply as possible, [example](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/36316).
### 4. Add the metric definition ### 4. Add the metric definition
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment