> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dqlabs.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Usage

> How the Usage tab shows query volume, performance, cost, and user activity for a Prizm asset, including how usage feeds criticality scoring.

<script type="application/ld+json">
  {`{
            "@context": "https://schema.org",
            "@type": "TechArticle",
            "headline": "Usage",
            "description": "How the Usage tab shows query volume, performance, cost, and user activity for a Prizm asset, including how usage feeds criticality scoring.",
            "url": "https://docs.dqlabs.ai/architecture/usage",
            "publisher": {
              "@type": "Organization",
              "name": "DQLabs Inc",
              "logo": "https://media.brand.dev/332adc35-5bc4-4d2b-bf78-256aa4a5e414.svg"
            }
            }`}
</script>

## Overview

The **Usage** tab on an asset page gives you visibility into how a data asset is being queried — including query volume, performance, cost, and who is accessing it. This helps you understand adoption, spot expensive or slow queries, and identify the users and warehouses driving activity.

You can access the Usage tab from any asset's detail page, alongside **Overview**, **Attribute**, **Metric**, **Lineage**, **Audit**, **Documentation**, **Conversation**, and **Custom**.

## Summary metrics

At the top of the Usage tab, six summary cards give you an at-a-glance view of the asset's usage over the selected period:

| Metric                     | Description                                                      |   |
| -------------------------- | ---------------------------------------------------------------- | - |
| **Total Queries**          | The total number of queries executed against this asset          |   |
| **Average Execution Time** | The mean runtime across all queries                              |   |
| **Query Success Rate**     | The ratio of successful queries to total queries executed        |   |
| **Total Consumed Credit**  | The total compute credits consumed by queries against this asset |   |
| **Unique Users**           | The number of distinct users who have queried this asset         |   |
| **Unique Warehouses**      | The number of distinct compute warehouses used to run queries    |   |

Each card includes an expandable `...` control for additional detail or drill-down.

## Queries tab

The **Queries** tab lists every query executed against the asset, under the **Data Usage** table.

<Frame>
  <img src="https://mintcdn.com/dqlabs/zQZ4T7lpNlpqbt2q/images/image-26.png?fit=max&auto=format&n=zQZ4T7lpNlpqbt2q&q=85&s=4eb0f6dfb1d4eeb1cd43c8fc6ea40786" alt="Image" width="1010" height="570" data-path="images/image-26.png" />
</Frame>

### Filters

Use the filter buttons above the table to narrow down results:

* **All** — every query recorded for this asset
* **Expensive** — queries with the highest credit consumption
* **Slower** — queries with the longest execution times
* **Popular** — the most frequently run queries

### Table columns

| Column                 | Description                                                             |
| ---------------------- | ----------------------------------------------------------------------- |
| **Query**              | The query text (truncated), e.g. `create or replace transient table...` |
| **Query Date**         | The date the query was executed                                         |
| **User**               | The account or service user that ran the query                          |
| **Start Time**         | Timestamp the query began execution                                     |
| **End Time**           | Timestamp the query finished execution                                  |
| **Status**             | Execution outcome, e.g. `SUCCESS`                                       |
| **Execution Time (s)** | How long the query took to run                                          |
| **Credits Used**       | Compute credits consumed by that query                                  |

You can search, sort, and filter the table using the icons in the top-right corner of the **Data Usage** panel (filter, sort, search, and overflow menu).

<Tip>
  Use the **Expensive** or **Slower** filters to quickly identify queries that may be good candidates for optimization.
</Tip>

## Users tab

Switch to the **Users** tab to see a breakdown of asset usage by user rather than by individual query.

<Frame>
  <img src="https://mintcdn.com/dqlabs/zQZ4T7lpNlpqbt2q/images/image-24.png?fit=max&auto=format&n=zQZ4T7lpNlpqbt2q&q=85&s=6884f2a17aafb6ff0394c7cbd9946d8e" alt="Image" width="1013" height="628" data-path="images/image-24.png" />
</Frame>

### Table columns

| Column                     | Description                                                |
| -------------------------- | ---------------------------------------------------------- |
| **Name**                   | The user or service account name                           |
| **Query Count**            | Total number of queries run by this user against the asset |
| **Average Duration (sec)** | Mean execution time across this user's queries             |
| **Total Credits Consumed** | Total compute credits consumed by this user's queries      |

As with the Queries tab, you can filter (**All**), search, sort, and access additional options via the icons in the top-right of the panel.

## How usage data is collected

Usage data is extracted per data source on a scheduled basis and aggregated into the metrics shown on this tab. The underlying source queries differ by connector:

<AccordionGroup>
  <Accordion title="Snowflake">
    Usage is derived by joining `SNOWFLAKE.ACCOUNT_USAGE.ACCESS_HISTORY` (to identify which tables were touched) with `SNOWFLAKE.ACCOUNT_USAGE.QUERY_HISTORY` (for execution time, status, warehouse, and credits). This produces one summary row per table with total queries, unique users, unique warehouses, average/slowest execution time, success/failure counts, credits used, and a breakdown by query type (`SELECT`, `INSERT`, `UPDATE`, `DELETE`, `MERGE`).
  </Accordion>

  <Accordion title="Databricks">
    Usage is derived from `system.query.history`, extracting the target table from the query text and aggregating the same set of signals as Snowflake (query count, unique users/warehouses, execution time, success/failure, query type breakdown).

    <Note>
      Databricks does not expose table size or row count from Unity Catalog without running per-table commands (`ANALYZE TABLE ... COMPUTE STATISTICS` and `DESCRIBE DETAIL`). Volume-related metrics for Databricks assets may be limited as a result.
    </Note>
  </Accordion>

  <Accordion title="SQL Server (MSSQL)">
    <Warning>
      Usage and Performance data is **not currently available** for SQL Server sources.
    </Warning>

    Unlike Snowflake and Databricks, SQL Server does not retain a persistent, queryable history of past executions:

    * **Query Store** (`sys.query_store_*` views) is often disabled or not actively capturing recent workloads, so any data returned can be significantly out of date.
    * **Dynamic Management Views** (`sys.dm_exec_query_stats`, etc.) only reflect what's currently cached in memory and reset on server restart.
    * **Active session views** (`sys.dm_exec_requests`, `sys.dm_exec_sessions`) only show queries running *right now* — there's no way to look back in time.

    As a result, the Usage tab for MSSQL assets won't show populated metrics until a persistent tracking mechanism is available on the source side.
  </Accordion>
</AccordionGroup>

### Usage and asset criticality

Usage metrics also feed into an asset's overall **Criticality** score, alongside freshness, dependency, volume, and metadata completeness. Usage makes up 30% of the criticality calculation, weighted as:

* Unique users — 60%
* Read query count — 40%

<Tip>
  If an asset's usage numbers look unexpectedly low, check whether it has few unique users or read queries relative to similar assets — this directly impacts its criticality ranking.
</Tip>

## Related pages

<CardGroup cols={2}>
  <Card title="Lineage" icon="diagram-project" href="/architecture/lineage">
    See upstream and downstream dependencies for this asset
  </Card>

  <Card title="Audit" icon="clipboard-list" href="/architecture/log/asset-audit">
    Review the change history for this asset
  </Card>
</CardGroup>
