Boost Snowflake query performance with Capital One Slingshot
Capital One Slingshot makes it easy for Snowflake admins to pinpoint and optimize frequent or costly queries.
Improving query performance in Snowflake
If you’re working with cloud-based data, you’ve probably been asked, “Which queries ran most frequently last quarter?” The question seems simple on its face, but could be challenging to answer without proper analytical tools and appropriate visibility into query data.
So how do you accurately determine your most frequently run queries? And, once you’ve done that, how do you further analyze them and unlock greater savings on compute spend associated with those queries? Queries are, after all, one of the key components to compute-spend in any Snowflake cloud.
While Snowflake can automatically handle efficient querying and analysis, there are ways to enhance query performance further using Capital One Slingshot. Slingshot makes it easy for any Snowflake admin to pinpoint and optimize frequent and costly queries in a few simple steps.
Step 1: Opt in for query autoloading
Customers have the option to review their costliest queries in a redacted format, to analyze their queries while protecting their data.
Once enabled, Slingshot will synchronize your query data, including query text, for the current month and the past two months. This synchronization occurs daily. Even string parameters in queries, whether enclosed in single or double quotes, as well as file and stage paths, will be redacted.
WHERE X = 'Y'` becomes WHERE X = 'REDACTED'
WHERE X = 123456 becomes WHERE X = 0
SELECT IF(X = "Y", 1, 0) becomes SELECT IF(X = 'REDACTED', 0, 0)
Step 2: Identify the most frequently run costly queries in Snowflake
Within the Slingshot UI, you can easily visualize the costliest queries and most frequently run queries and run them through the Query Advisor with a simple click. These queries are sorted by highest cost, which are aggregated from all query runs over the past two months and the current month. When a user clicks on "analyze," the query text is retrieved and assessed by Query Advisor to identify potential inefficiencies and provide suggestions on how to improve them.
Optimize queries to operate efficiently in the cloud
By leveraging Capital One Slingshot, Snowflake admins can easily identify and improve frequent and costly queries. As your business grows and handles greater volumes of data in the cloud, efficient queries can become even more crucial to success and scalability. Optimized queries lead to faster decision making, cost savings and improved system performance.