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
| Dimension | Description or value |
|---|---|
| message | Database wait statistics snapshot taken: {snapshotId} |
| severityLevel | 1 |
| user_Id | The 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
| Dimension | Description or value |
|---|---|
| eventId | RT0025 |
| snapshotId | Specifies the ID given to the snapshot. |
Common custom dimensions
The following table explains custom dimensions that are common to all database wait statistic traces.
| Dimension | Description or value |
|---|---|
| aadTenantId | Specifies 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. |
| component | Dynamics 365 Business Central Server. |
| componentVersion | Specifies the version number of the component that emits telemetry (see the component dimension.) |
| environmentType | Specifies the environment type for the tenant, such as Production, Sandbox, Trial. Learn more in Environment types. |
| telemetrySchemaVersion | Specifies 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
| Dimension | Description or value |
|---|---|
| message | Database wait statistics snapshot entry: {databaseWaitStatisticsCategory} |
| severityLevel | 1 |
| user_Id | The 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
| Dimension | Description or value |
|---|---|
| eventId | RT0026 |
| snapshotId | Specifies the ID given to the snapshot. |
| databaseMaxWaitTimeInMs | Specifies the maximum wait time in milliseconds for a specific wait category. |
| databaseSignalWaitTimeInMs | Specifies the total time in milliseconds that tasks in the wait category spent waiting to run after being signaled that their resource was available. |
| databaseStartedDuration | Specifies the elapsed time in milliseconds since SQL Server started. |
| databaseWaitingTasksCount | Specifies the total number of waits for a wait category. |
| databaseWaitStatisticsCategory | Specifies which type of wait a query is experiencing. |
| databaseWaitTimeInMs | Specifies the total wait time for a wait category including the databaseSignalWaitTimeInMs. |
| See common custom dimensions |
Related information
Monitoring and Analyzing Telemetry
Enable Sending Telemetry to Application Insights
Performance for Developers
How to work with a performance problem