Errors and Warnings Event Classes
The following table describes the Errors and Warnings event classes in the Errors and Warnings event category.
Event class | Description |
---|---|
Attention | Collects all attention events, such as client-interrupt requests or when a client connection is broken. |
ErrorLog | Error events have been logged in the Microsoft® SQL Server™ error log. |
EventLog | Events have been logged in the Microsoft Windows® application log. |
Exception | Exception has occurred in SQL Server. |
Execution Warnings | Any warnings that occurred during the execution of a SQL Server statement or stored procedure. |
Hash Warning | Hashing operation may have encountered a problem. |
Missing Column Statistics | Column statistics for the query optimizer are not available. |
Missing Join Predicate | Executing query has no join predicate. This can result in a long-running query. |
OLEDB Errors | OLE DB error has occurred. |
Sort Warnings | Sort operations do not fit into memory. This does not include sort operations from the creation of indexes, only sort operations within a query (for example, an ORDER BY clause used in a SELECT statement). |
The Execution Warnings event class can be monitored to determine how long, if at all, queries had to wait for resources before proceeding. This is important for determining whether there are any contention issues in the system that can affect performance and therefore need investigating. Use the Locks event classes to determine the objects affected.
The Hash Warning event class can be used to monitor when a hash recursion or hash bail has occurred during a hashing operation. Hash recursion occurs when the build input does not fit into memory, resulting in input split into multiple partitions, which are processed separately. If any of these partitions still do not fit into memory, they are split further into sub-partitions, which then are processed separately. This process continues until each partition fits into memory or the maximum recursion level is reached (displayed in the Integer Data data column), thus causing hash bail.
Hash bail occurs when a hashing operation reaches its maximum recursion depth and reverts to an alternate plan to process its remaining partitioned data. Hash bail is due usually to skewed data, trace flags, or bit counting. To eliminate or reduce the chance of hash bail, verify that statistics exist on the columns being joined or grouped. For more information, see Statistical Information.
If hash bail continues to occur each time the query is executed, consider using an optimizer hint to force a different algorithm to be used by the query optimizer and then compare the performance of the query. For more information about join hints, see FROM.
By monitoring the Missing Column Statistics event class, you can determine whether there are statistics missing for a column used by a query. Missing statistics can cause the optimizer to choose a less-efficient query plan. For more information about creating column statistics, see Statistical Information.
The Sort Warnings event class can be used to monitor query performance. If a query involving a sort operation generates a Sort Warnings event class with an Event Sub Class data column value of 2, the performance of the query can be affected because multiple passes over the data are required to sort the data. Investigate the query further to determine whether the sort operation can be eliminated.