Analyzing database wait statistics telemetry

APPLIES TO: Business Central 2022 release wave 1, version 20.0, and later

The database performance can also be analyzed by checking the information at Database Wait Statistics. You can see the number of waits recorded for different wait categories, along with their wait times. The wait types give you an idea about the resources or operations that are responsible for the slow performance.

Learn more in Database Wait Statistics in Dynamics 365 Business Central.

Note

These statistics show time spent in completed waits since the last reset. They don't include waits currently in progress.

Database wait statistics snapshot taken

Occurs when a database wait statistics snapshot is requested, such as when you select Emit Telemetry on the Database Wait Statistics page in the client. A snapshot is also taken when additional logging starts or ends.

General dimensions

DimensionDescription or value
messageDatabase wait statistics snapshot taken: {snapshotId}
severityLevel1
user_IdThe user telemetry ID for the user. From the user card, you can use user_Id to identify the user who triggered this telemetry event. Learn more in Assign a telemetry ID to users.

Custom dimensions

DimensionDescription or value
eventIdRT0025
snapshotIdSpecifies the ID given to the snapshot.

Common custom dimensions

The following table explains custom dimensions that are common to all database wait statistic traces.

DimensionDescription or value
aadTenantIdSpecifies the Microsoft Entra tenant ID used for Microsoft Entra authentication. For on-premises, if you aren't using Microsoft Entra authentication, this value is common.
componentDynamics 365 Business Central Server.
componentVersionSpecifies the version number of the component that emits telemetry (see the component dimension.)
environmentTypeSpecifies the environment type for the tenant, such as Production, Sandbox, Trial. Learn more in Environment types.
telemetrySchemaVersionSpecifies the version of the Business Central telemetry schema.

Database wait statistics snapshot entry

Occurs for each wait category included in a database wait statistics snapshot. Each entry contains aggregated SQL wait statistics, not an event for an individual query waiting in the client.

General dimensions

DimensionDescription or value
messageDatabase wait statistics snapshot entry: {databaseWaitStatisticsCategory}
severityLevel1
user_IdThe user telemetry ID for the user. From the user card, you can use user_Id to identify the user who triggered this telemetry event. Learn more in Assign a telemetry ID to users.

Custom dimensions

DimensionDescription or value
eventIdRT0026
snapshotIdSpecifies the ID given to the snapshot.
databaseMaxWaitTimeInMsSpecifies the maximum wait time in milliseconds for a specific wait category.
databaseSignalWaitTimeInMsSpecifies the total time in milliseconds that tasks in the wait category spent waiting to run after being signaled that their resource was available.
databaseStartedDurationSpecifies the elapsed time in milliseconds since SQL Server started.
databaseWaitingTasksCountSpecifies the total number of waits for a wait category.
databaseWaitStatisticsCategorySpecifies which type of wait a query is experiencing.
databaseWaitTimeInMsSpecifies the total wait time for a wait category including the databaseSignalWaitTimeInMs.
See common custom dimensions

Monitoring and Analyzing Telemetry
Enable Sending Telemetry to Application Insights
Performance for Developers
How to work with a performance problem