[]
The Aggregation Query Information button is a data exploration tool that provides visibility into the SQL generated and executed by a dashboard scenario. It is designed primarily for performance analysis when using a Direct Querydata model.
When enabled, this feature allows dashboard users and administrators to:
View the exact SQL query executed for a visualization or aggregation.
Review the time required to build and execute the SQL.
Determine whether backend cache data was used.
Copy the SQL query for external analysis and optimization.
This capability is especially useful for diagnosing performance bottlenecks and optimizing database execution plans.
The primary purpose of Aggregation Query Information is performance analysis.
When working with direct query datasets, dashboards generate SQL dynamically based on the data bindings, aggregations, filters, and sorting rules applied to a scenario. In cases where performance needs to be improved, developers or database administrators may need to:
Identify the SQL statement that was executed.
Run the query directly in the database.
Review the execution plan.
Create indexes or optimize database structures to improve performance.
By exposing the executed SQL and its timing metrics, this feature enables precise database-level tuning.
Aggregation Query Information is not enabled by default. It must be manually configured in the Admin Portal.
To enable this feature:
Open the Admin Portal.
Navigate to Configuration.
Select Dashboards.
Open the Designer panel (Configure Dashboards).
In the Data section, set Enable Query Metrics to True.
Click Save Changes.
Once enabled, the Aggregation Query Information icon becomes available in supported dashboard scenarios.
For additional configuration details, see the Designer article.
To better understand how this feature works, consider a simple column chart.
Note
The dataset used in the following examples is an Excel is a sample dataset in Wyn named RetailDataset.
In this example, a column chart has been created using a retail sales dataset.
The Revenue field is bound to the Values data binding slot.
The Product Line field is bound to the Axis (Category) slot.

After the scenario is configured, an icon appears in the data exploration toolbar. The Aggregation Query Information icon is represented by a page containing the text “SQL” with a magnifying glass.

Selecting this icon opens the Aggregation Query Information window.

The window contains four key elements:
Use Backend Cache Data
Indicates whether the query result was retrieved from backend cache rather than fully executed against the data source.
In this example, the value is Yes, meaning cached data was used. Backend caching helps improve performance by reducing repeated execution of identical queries.
Build SQL Time
The time required to generate the SQL statement dynamically based on the scenario configuration.
In this case: 318 milliseconds.
Execute SQL Time
The time required for the database to execute the generated SQL statement.
In this case: 29 milliseconds.
SQL
The full SQL query executed for the visualization. This query can be copied and executed directly in the database for further analysis and optimization.
The SQL generated for this column chart scenario includes joins, aggregations, grouping, ordering, and limit constraints based on the data bindings and visualization requirements.
SELECT
"RetailDataset4"."RetailDatasetProductline" AS "RetailDataset_Productline",
"RetailDataset4"."RetailDataset_Productline_Order_null" AS "RetailDataset_Productline_Order_null",
"RetailDataset4"."RetailDataset_Revenue_SUMX" AS "RetailDataset_Revenue_SUMX"
...
ORDER BY "RetailDataset_Productline" ASC NULLS FIRST
LIMIT 10000001This query reflects:
Aggregation of revenue using SUM
Grouping by product line
Sorting logic applied to the axis
Null-handling logic
Data shaping required for the column chart
The complexity of the SQL demonstrates how the dashboard translates visual configuration into executable database logic.
Aggregation Query Information is also available when using data aggregations inside a Rich Text Box.
To insert a data aggregation:
Select the rich text box editor.
Click the pencil icon to edit.
From the toolbar, select the ∑ (Sigma) icon.
Configure the aggregation settings.
Click OK.
For more information about inserting aggregations, see the Rich Text Box Examples article, specifically the section on Dynamic Data Options.
Using the same retail dataset:
Field: Year
Aggregation Method: Sum
Display Unit: Auto
Format: General
After confirming the configuration, the editor displays:
{Sum of Year}When the rich text box is selected, the Aggregation Query Information icon becomes available.

Opening the window displays:
Use Backend Cache Data: No
Build SQL Time: 301 milliseconds
Execute SQL Time: 44 milliseconds
SQL Expression: The generated query
SELECT
(SUM("RetailDataset1"."Year")) AS "RetailDataset_Year_SUMX"
FROM (SELECT
"RetailDataset1"."Year" AS "Year"
FROM (SELECT
"RetailDataset"."Year" AS "Year"
FROM (select * from read_parquet(['../wyndbs/analysis/af821802-d328-471a-ac4b-978ae37b20e7/af821802-d328-471a-ac4b-978ae37b20e7_v1/1.parquet']))
"RetailDataset"
)
"RetailDataset1"
)
"RetailDataset1"
ORDER BY "RetailDataset_Year_SUMX" ASC NULLS FIRST
LIMIT 10000001This SQL is simpler than the column chart example because:
No grouping is required.
No joins are required.
Only a single aggregation is performed.
The Use Backend Cache Data indicator shows whether the system retrieved results from cached query output rather than re-executing the full SQL statement against the data source.
Yes means the query result was served from cache.
No means the query was executed directly against the data source.
Caching improves performance by reducing redundant query execution, especially in dashboards with repeated or identical queries.