{question}
How can I interpret the visual profile of a query?
{question}
{answer}
To understand a query's visual profile, you must first gather one via Studio or using the KB Debug Profile.
The Visual Profile has different key sections that give important information about how the query was executed.
Query - This illustrates the query for which the profile is generated.
Section 1 - This shows a summary of how the query performed.
Some important parameters are `Execution Time` and `Memory Usage`.
In the above screenshot,
Section 2 - This shows the time taken by individual operators of the query, sorted from high to low.
If you click the hyperlink on the `Operator` section, you will be taken to the corresponding operator in the Visual Profile.
For example - ColumnStoreScan, Project, Broadcast, etc.
You can refer to the details of the operators in Query Plan Operations.
Section 3 - This displays the warnings that are potential candidates for causing performance degradation in a query.
Section 4 - This section displays the actual execution tree of the query.
To check further, use the `Zoom In/Zoom Out` buttons located at the bottom left of the screen. In the screenshot below, we can see that the `ColumnstoreScan` of each table accounted for 50% of the execution time. If the query execution time needs further improvement, this is a potential starting point.
On clicking individual operators like `ColumnStoreScan`, you can see metrics like Memory, CPU, etc., taken by this operator of the query.
You can also obtain details such as the number of records processed by each query operator.
The execution tree also displays the operators that consume more time in the query. This is highlighted in red, as shown in the screenshot below.
For more information on Query Tuning, you can refer here.
{answer}