SVCS_ALERT_EVENT_LOG

Records an alert when the query optimizer identifies conditions that might indicate performance issues. This view is derived from the STL_ALERT_EVENT_LOG system table but doesn't show slice-level for queries run on a concurrency scaling cluster. Use the SVCS_ALERT_EVENT_LOG table to identify opportunities to improve query performance.

A query consists of multiple segments, and each segment consists of one or more steps. For more information, see Query Processing.

SVCS_ALERT_EVENT_LOG is visible to all users. Superusers can see all rows; regular users can see only their own data. For more information, see Visibility of Data in System Tables and Views.

Table Columns

Column Name Data Type Description
userid integer ID of the user who generated the entry.
query integer Query ID. The query column can be used to join other system tables and views.
segment integer Number that identifies the query segment.
step integer Query step that executed.
pid integer Process ID associated with the statement and slice. The same query might have multiple PIDs if it executes on multiple slices.
xid bigint Transaction ID associated with the statement.
event character(1024) Description of the alert event.
solution character(1024) Recommended solution.
event_time timestamp Time in UTC that the query started executing, with 6 digits of precision for fractional seconds. For example: 2009-06-12 11:29:19.131358.

Usage Notes

You can use the SVCS_ALERT_EVENT_LOG to identify potential issues in your queries, then follow the practices in Tuning Query Performance to optimize your database design and rewrite your queries. SVCS_ALERT_EVENT_LOG records the following alerts:

Sample Queries

The following query shows alert events for four queries.

SELECT query, substring(event,0,25) as event, substring(solution,0,25) as solution, trim(event_time) as event_time from svcs_alert_event_log order by query; query | event | solution | event_time -------+-------------------------------+------------------------------+--------------------- 6567 | Missing query planner statist | Run the ANALYZE command | 2014-01-03 18:20:58 7450 | Scanned a large number of del | Run the VACUUM command to rec| 2014-01-03 21:19:31 8406 | Nested Loop Join in the query | Review the join predicates to| 2014-01-04 00:34:22 29512 | Very selective query filter:r | Review the choice of sort key| 2014-01-06 22:00:00 (4 rows)