All Collections
Data
Snowflake in Astrato
Creating efficient queries using data Query Profile Insights
Creating efficient queries using data Query Profile Insights

Stop wasting time on inefficient queries using Astrato's data Query Profile Insights Snowflake's GET_QUERY_OPERATOR_STATS

Piers Batchelor avatar
Written by Piers Batchelor
Updated over a week ago

Astrato's Data Query Profile Insights detects and identifies query inefficiencies - no coding required. This feature works with Snowflake's new table function - GET_QUERY_OPERATOR_STATS - that returns statistics about individual operators within a query.

Right-click on any chart, scroll down to select Data Query Insights.

Figure 1: Right-click on any chart, scroll down to select Data Query Insights

Viewing your Data Query Insights

  1. Right-click on any chart.

  2. Scroll down to select Data Query Insights.

  3. The Query Profile Insights details display beneath the formatted SQL query.

  4. The results display a red circle when a common query inefficiency - Cartesian, Union, Memory, or Pruning - appears.

  5. Click Copy result to send the results to your Snowflake administrator. The results include the number of rows scanned and the estimated credits the query uses.

Figure 2: View and copy the results of the data Query Profile.

Example of a query result

{"querylink":"https://app.snowflake.com/west-europe.azure/fd29442/#/compute/history/queries/01abdcff-0101-f3ec-0000-43c1049318da/detail","cacheUsed":false,"metaDataQuery":false,"creditsBestCase":0.000031,"creditsWorstCase":0.000276,"creditsFairValue":0.000276,"rowsScanned":2788,"joinIssue":false,"unionIssue":false,"memoryIssue":false,"pruningIssue":false}

Did this answer your question?