Documentation: What can be done to speed up database reviews?
From Database Office Hours call:
what can engineers do to help speed up the review on DB side ? Provide the actual SQLs, execution plans, other ? What about update/delete statements ? Plans on getting production or close to production replicas available to engineers for testing/optimising?
- Self-service testing - underway with chatops to address security concerns.
- Actual SQLs, plans before/after really help!
- Formatting queries, for example with http://sqlformat.darold.net
- Put plains in https://explain.depesz.com/
- Pick good parameter values for queries when testing them! Gitlab-ce project is often a good choice.
- Become a Database Maintainer!
- Sometimes the comment gets very big though with sql and explain plan E.g https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/14366#note_193287021. So maybe externalize the plan in the visual tool.
Should go here: https://docs.gitlab.com/ee/development/database_review.html