# Query drilldown view

Use the Query drilldown to investigate how a single query pattern behaves across your environment. The drilldown helps you understand query usage, failures, and execution context so you can troubleshoot issues and assess impact.

You open the Query drilldown by selecting a query pattern from the **Queries** table in **Settings**, then **Metric Data**, then **Usage Analysis**, then **Queries**.

## How the query drilldown works

Each entry in the Queries table represents a normalized query pattern. The Query drilldown focuses on one pattern and shows how it executes across locations for a selected day.

Every value you see in the drilldown is recalculated based on the selected date and any applied location filter.

## Query pattern summary

The header summarizes the overall usage and health of the query pattern.

**Query pattern**

Shows the normalized query pattern in a read-only code block. Select the copy icon to copy the full pattern. This helps you confirm which query you are analyzing.

**Times used**

Shows how many times the query pattern executed on the selected date. Use this value to understand how heavily the query is used.

**Last run**

Shows the most recent execution time for the query pattern. This confirms whether the query is still active.

**Status**

Shows success and failure rates for executions on the selected date. This provides a quick signal of query health.

**Date selector**

Use the date selector to view query behavior for a specific day. All metrics and charts update when you change the date.

**Raw query logs**

Use the **Raw query logs** toggle to enable raw query log collection for this query pattern. This is useful when you need deeper visibility into individual executions.

## View trends over time

The **Trends** section shows how the query pattern behaves across recent days.

**Requests**

Displays how many times the query pattern executed each day. Use this chart to identify usage spikes or drops.

**Errors and failure rate**

Shows how many executions failed and how the failure rate changes over time. Use this chart to spot recurring or isolated failures.

## Analyze errors

The **Errors** section breaks down query failures.

Use **Breakdown by** to group errors by:

- **Type**
- **Location**

If the query did not fail on the selected date, the chart displays *No data to display*. This helps you quickly confirm whether failures occurred.

## Analyze requests

Use the **Requests** section to see how executions are distributed.

Use **Breakdown by** to group requests by:

- **Location**
- **Type**

This view helps you understand where the query runs and which execution types contribute most to usage.

## Review locations

The **Locations** table lists all locations where the query pattern ran.

For each location, the table shows:

- Location name
- Last runtime
- Success and failure rates
- Number of executions

Use the search field or location filter to narrow the list. This is useful when failures occur only in specific alerts or contexts.

## Use the query drilldown effectively

Use the Query drilldown to:

- Investigate why a query pattern fails
- Confirm whether a query is still actively used
- Identify locations responsible for most executions
- Focus troubleshooting on high-impact queries

By combining usage metrics, trends, error breakdowns, and location data, the Query drilldown helps you move from symptom to root cause without leaving Coralogix.
