# Inefficient Execution of Repeated Queries

Canonical: https://www.pointfive.co/efficiency-hub/inefficiencies/inefficient-execution-of-repeated-queries

[Cloud Efficiency Hub](https://www.pointfive.co/efficiency-hub) 

# Inefficient Execution of Repeated Queries

## Explanation

Inefficient execution of repeated queries occurs when common query patterns are frequently executed without optimization. Even if individual executions are successful, repeated inefficiencies compound overall compute consumption and credit costs.

By analyzing Snowflake's parameterized query metrics, organizations can identify top repeated queries and optimize them for better performance, resource usage, and cost-efficiency.

## Relevant Billing Model

## Detection

- Review parameterized query groupings to identify the most frequently executed query patterns

- Analyze whether repeated queries are incurring high cumulative warehouse costs or extended runtimes

- Evaluate if frequent errors are occurring in repeated query executions, indicating underlying inefficiencies

- Consult with data engineering teams to assess whether query logic, data access patterns, or indexing strategies can be improved

## Remediation

- Prioritize optimization efforts on the highest-cost or highest-frequency repeated queries

- Refactor query structures to minimize unnecessary complexity, joins, or large data scans

- Tune data models, clustering keys, or materialized views to support more efficient repeated query execution

- Apply query scheduling or caching techniques where possible to reduce redundant executions

- Monitor parameterized query patterns regularly to identify and address emerging inefficiencies

## Relevant Documentation

- [Query Cost Attribution](https://docs.snowflake.com/en/sql-reference/account-usage/query_attribution_history)

- [Query History](https://docs.snowflake.com/en/sql-reference/functions/query_history)

[Submit Feedback](https://hub.pointfive.co/inefficiencies/inefficient-execution-of-repeated-queries)

## At a glance

Reference

CER-0112

Cloud provider

Snowflake

Service

Snowflake Query Processing

Category

[Compute](https://www.pointfive.co/efficiency-hub/service-category/compute)

Inefficiency type

Inefficient Query Pattern

## Contributed by

- Simar Arora 

### Simar Arora

Value Engineer - FinOps @ Snowflake

[LinkedIn](https://www.linkedin.com/in/simarpreet-arora/)

---
Source: the public page above. Product screenshots and illustrative interfaces are examples, not live customer data.

