In this recipe, we will show you the basic steps that you can follow to optimize or tune a query. Please be aware that a query can be tuned via multiple methods. This recipe will provide some fundamental steps that can be applied to any query to optimize it as per its identified issue.
A query can show the following issues:
- A product join
- A skewed join
- High CPU/IO steps
- Skewed PI
- Other factors such as using function in joins, joining unmatched columns, and many more