---
title: Google Cloud Database Insights
description: >-
  Monitor query execution time, latency, lock time, and row counts across your
  Google Cloud databases.
breadcrumbs: Docs > Integrations > Google Cloud Database Insights
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# Google Cloud Database Insights
Integration version1.0.0
{% callout %}
# Important note for users on the following Datadog sites: us2.ddog-gov.com

{% alert level="info" %}
To find out if this integration is available in your organization, see your [Datadog Integrations](https://app.datadoghq.com/integrations) page or ask your organization administrator.

To initiate an exception request to enable this integration for your organization, email [support@ddog-gov.com](mailto:support@ddog-gov.com).
{% /alert %}

{% /callout %}

## Overview{% #overview %}

[Google Cloud Database Query Insights](https://cloud.google.com/products/database-insights) helps you detect, diagnose, and prevent query performance problems by surfacing query execution time, latency, lock time, and row counts across your databases.

## Setup{% #setup %}

### Installation{% #installation %}

The Google Cloud Database Query Insights check requires the [Google Cloud Platform integration](https://docs.datadoghq.com/integrations/google-cloud-platform.md) to be configured. No additional installation is needed once the Google Cloud Platform integration is set up.

## Data Collected{% #data-collected %}

### Metrics{% #metrics %}

|  |
|  |
| **gcp.dbinsights.aggregate.execution_count**(count)      | Total number of query executions per user and database.                                                                                                                                                                                                     |
| **gcp.dbinsights.aggregate.execution_time**(count)       | Cumulative query execution time per user and database. This is the sum of the time required for the CPU, IO wait, lock wait, process context switching, and scheduling for all the processes involved in the query execution.*Shown as microsecond*         |
| **gcp.dbinsights.aggregate.io_time**(count)              | Cumulative IO wait time per user and database.*Shown as microsecond*                                                                                                                                                                                        |
| **gcp.dbinsights.aggregate.latencies.avg**(gauge)         | Cumulative query latency distribution per user and database.*Shown as microsecond*                                                                                                                                                                          |
| **gcp.dbinsights.aggregate.latencies.samplecount**(count) | Cumulative query latency distribution per user and database.                                                                                                                                                                                                |
| **gcp.dbinsights.aggregate.latencies.sumsqdev**(count)    | Cumulative query latency distribution per user and database.                                                                                                                                                                                                |
| **gcp.dbinsights.aggregate.lock_time**(count)            | Cumulative lock wait time per user and database.*Shown as microsecond*                                                                                                                                                                                      |
| **gcp.dbinsights.aggregate.row_count**(count)            | Total number of rows affected during query execution.                                                                                                                                                                                                       |
| **gcp.dbinsights.perquery.execution_count**(count)       | Total number of query executions per user, database, and query.                                                                                                                                                                                             |
| **gcp.dbinsights.perquery.execution_time**(count)        | Cumulative query execution time per user, database, and query. This is the sum of the time required for the CPU, IO wait, lock wait, process context switching, and scheduling for all the processes involved in the query execution.*Shown as microsecond* |
| **gcp.dbinsights.perquery.io_time**(count)               | Cumulative io wait time per user, database, and query.*Shown as microsecond*                                                                                                                                                                                |
| **gcp.dbinsights.perquery.latencies.avg**(gauge)          | Cumulative query latency distribution per user, database, and query.*Shown as microsecond*                                                                                                                                                                  |
| **gcp.dbinsights.perquery.latencies.samplecount**(count)  | Cumulative query latency distribution per user, database, and query.                                                                                                                                                                                        |
| **gcp.dbinsights.perquery.latencies.sumsqdev**(count)     | Cumulative query latency distribution per user, database, and query.                                                                                                                                                                                        |
| **gcp.dbinsights.perquery.lock_time**(count)             | Cumulative lock wait time per user, database, and query.*Shown as microsecond*                                                                                                                                                                              |
| **gcp.dbinsights.perquery.row_count**(count)             | Total number of rows affected during query execution.                                                                                                                                                                                                       |
| **gcp.dbinsights.pertag.execution_count**(count)         | Total number of query executions per user, database, and tag.                                                                                                                                                                                               |
| **gcp.dbinsights.pertag.execution_time**(count)          | Cumulative query execution time per user, database, and tag. This is the sum of the time required for the CPU, IO wait, lock wait, process context switching, and scheduling for all the processes involved in the query execution.*Shown as microsecond*   |
| **gcp.dbinsights.pertag.io_time**(count)                 | Cumulative IO wait time per user, database and tag.*Shown as microsecond*                                                                                                                                                                                   |
| **gcp.dbinsights.pertag.latencies.avg**(gauge)            | Cumulative query latency distribution per user, database, and tag.*Shown as microsecond*                                                                                                                                                                    |
| **gcp.dbinsights.pertag.latencies.samplecount**(count)    | Cumulative query latency distribution per user, database, and tag.                                                                                                                                                                                          |
| **gcp.dbinsights.pertag.latencies.sumsqdev**(count)       | Cumulative query latency distribution per user, database, and tag.                                                                                                                                                                                          |
| **gcp.dbinsights.pertag.lock_time**(count)               | Cumulative lock wait time per user, database and tag.*Shown as microsecond*                                                                                                                                                                                 |
| **gcp.dbinsights.pertag.row_count**(count)               | Total number of rows affected during query execution.                                                                                                                                                                                                       |

### Events{% #events %}

The Google Cloud Database Query Insights integration does not include any events.

### Service Checks{% #service-checks %}

The Google Cloud Database Query Insights integration does not include any service checks.

## Troubleshooting{% #troubleshooting %}

Need help? Contact [Datadog support](https://docs.datadoghq.com/help/).
