Database Monitoring provides visibility into query plans, waits, indexes, and schema details for monitored database instances.
This page explains how Database Monitoring consumption is calculated and how you can manage your spend in Dynatrace.
This page applies to the latest version of
Databases. If you are using an earlier version, upgrade to the latest version to access these features.
Database Monitoring consumption is measured in database-instance-hours, using the Database Monitoring rate card item.
A database instance is any instance monitored with Database Monitoring that hosts one or more databases.
It is identified by host, port, and database name.
Queries that run on your database, and have the same structure but differ only in their parameters, are combined by Dynatrace into one pattern. This pattern is called a normalized database query.
For more information, see Normalized database queries.
Dynatrace Query Language (DQL) queries are a separate concept and won't incur Database Monitoring consumption.
Billing is based on the number of database instances that are monitored. It does not matter how many databases run on each database instance: The more database instances you monitor, the more database-instance-hours you consume.
Database Monitoring currently supports databases monitored by the PostgreSQL extension or MySQL extension.
For other SQL extensions, billing is currently based on Metrics powered by Grail and Logs powered by Grail.
As an example, the following monitoring configuration shows two separate database instances in Dynatrace.
"sqlMySqlRemote": {"endpoints": [{"host": "mysql-host-1.company.com","port": 3306,"databaseName": "dynatrace"},{"host": "mysql-db.us-east-1.rds.amazonaws.com","port": 1521,"databaseName": "serviceName"}]}
A single physical or virtual machine can host multiple database instances. In such a case, each database instance is billed separately.
Queries that run on your database, and have the same structure but differ only in their parameters, are combined by Dynatrace into one pattern. Here's how database queries are normalized.
SELECT name FROM customers WHERE id = 101;SELECT name FROM customers WHERE id = 205;
SELECT name FROM customers WHERE id = ?;
This also works for more complex queries with multiple parameters.
SELECT * FROM orders WHERE status = 'shipped' AND total > 50;SELECT * FROM orders WHERE status = 'pending' AND total > 100;
SELECT * FROM orders WHERE status = ? AND total > ?;
Dynatrace is built for elastic cloud-native environments where services, including database instances, are often short-lived. Therefore, billing granularity for Database Monitoring is based on 15-minute intervals. When a database instance is monitored for fewer than 15 minutes in an interval, consumption is rounded up to the next full 15-minute interval.
Normalized database queries are captured in five-minute intervals. Each monitored database instance captures 333 normalized database queries every five minutes. This results in up to 1,000 normalized database queries per 15-minute interval. Any additional database queries will not be captured.
Queries are captured according to the total amount of time that is spent running on the server; a fast query that runs millions of times will rank higher than a slow query that runs only once.
If you set a collection interval shorter than the default five minutes, this may result in additional costs. Every 1,000 normalized database queries above the included 1,000 are billed as 0.25 database-instance-hours within a single 15-minute interval.
Normalized database queries that are not consumed within the 15-minute interval do not roll over to subsequent intervals. The included quota is specific to each instance, and cannot be used by other database instances.
In the following example, two database instances are billed in 15-minute intervals. A total of 1.25 database-instance-hours are consumed in the four 15-minute intervals.
The database instances are billed as follows:
Database instance 1:
Database instance 2:

The following example shows how Dynatrace calculates Database Monitoring costs.
For simplicity, this example assumes that:
100 database instances × $0.11 × 24 hours × 30 days = $7,920 per month
Dynatrace provides various options to help you understand and analyze your organization's consumption of Database Monitoring.
You can view your usage in Account Management. Go to Account Management > Subscription > Overview, and then scroll down to the Cost and usage details section to see your total usage. You can filter the data by DPS capability and environment.

From here, you can access a pre-made notebook to explore your usage of a specific capability and environment in detail.

Billing usage events (BUEs, billing_usage_event) are system events emitted by Dynatrace into the dt.system.events data space.
Billing usage events contain:
You can use billing usage events as the authoritative source when building cost allocation, usage analysis, or cost transparency views.
BUEs represent already-calculated, billable usage for DPS capabilities (not any configuration or potential usage). They align with what Account Management displays and what appears on invoices, so they are the recommended data source for understanding related consumption.
You can use DQL to query BUEs, and analyze usage and cost for Database Monitoring without re-applying billing rules or session-counting logic.
Here are some example DQL queries for various use cases. You can use these queries as-is, or modify them to meet your needs.
Get the number of instances monitored for the last 24 hours.
fetch dt.system.events, from: now() - 24h| filter event.kind == "BILLING_USAGE_EVENT" and event.type == "Database Monitoring"| summarize `Last 24h consuming Database-instances` = countDistinct(dt.smartscape_source.id)
Show a trend of the number of database-instance-hours consumed daily.
fetch dt.system.events| filter event.kind == "BILLING_USAGE_EVENT" and event.type == "Database Monitoring"| makeTimeseries { `Total database-instance-hours` = sum(`database-instance-hours`, default:0) }, time:usage.start, interval:24h
Get a list of database instances that consume the most database-instance-hours.
fetch dt.system.events| filter event.kind == "BILLING_USAGE_EVENT" and event.type == "Database Monitoring"| summarize `Total database-instance-hours` = sum(`database-instance-hours`), by: {smartscape.id = dt.smartscape_source.id,smartscape.type = dt.smartscape_source.type,dt.cost.costcenter,dt.cost.product}| fields smartscape.id, smartscape.type, `Total database-instance-hours`, dt.cost.costcenter, dt.cost.product| sort `Total database-instance-hours` desc
Get a line chart that shows the five database instances that have consumed the most within the last 15 days.
fetch dt.system.events, from: now() - 15d| filter event.kind == "BILLING_USAGE_EVENT" and event.type == "Database Monitoring"| makeTimeseries database_queries = sum(database_queries), by:{dt.smartscape_source.id}, time:usage.start, interval:15m| sort database_queries desc| limit 5| filterOut interval > 15m
If you query a timeframe greater than 15 days, the database query limits cannot be displayed in 15-minute intervals.
You can use Cost Allocation to allocate your Database Monitoring consumption to specific products or cost centers. Add Cost Allocation tags either as part of creating a new database instance, or add them to an existing database instance.
As part of creating a new database instance:
Databases > Overview > Add DB Instance > Define metadata and context.Add to an existing database instance:
Databases > Recommendations > Manage extensions.Consumption is tracked in database-instance-hours. The longer an instance is monitored, the more you consume.
By a combination of host, port, and database name. Even if two instances live on the same machine, they're counted and billed separately.
15 minutes. If your instance is monitored for even one minute within a 15-minute window, consumption rounds up to the full interval.
Unless you've manually shortened the default normalized database queries collection interval of five minutes, you won't incur additional costs. Shortening it may result in additional costs. Each instance includes 1,000 normalized database queries per 15-minute interval at no extra cost. Beyond that, every additional 1,000 queries adds 0.25 database-instance-hours.
No.
Databases usage is included with Database Monitoring, and doesn't generate any DQL query consumption.
However, running DQL queries outside of
Databases can result in consumption of Log Analytics - Query.