Use Monitoring Tables
QUERY_EVENTS System Table
QUERY_EVENTS system table provides useful information about queries that have been recently executed in your Data Warehouse instance (see QUERY_EVENTS).
EVENT_TIMESTAMPcolumn contains the timestamp that is recorded when the event occurs, which can assist in identifying the code that was being executed at the time of the event.
EVENT_TYPEcolumn provides information about the type of the captured events. The following values may indicate a problem that requires attention:
PREDICATE OUTSIDE HISTOGRAM: The query optimizer encountered a predicate that was false for the entire histogram created by
NO HISTOGRAM: The query optimizer encountered a predicate on a column lacking a histogram.
MEMORY LIMIT HIT: The optimizer used all allocated memory when creating the query plan. Simplify your query instead of increasing the memory allocation.
EVENT_DESCRIPTIONcolumn provides information about the captured events. For example:
GROUP BY key set did not fit in memory, using external sort grouping: To fix this issue, consider a projection sorted by the
GROUP BYkey to enable pipelined
GROUP BYsorting, which forces only the group that is currently being processed to be retained in memory (see GROUP BY Paths).
Many rows were resegmented during plan execution: To fix this issue, consider using identically segmented projections (see Minimize Network Joins).
The optimized encountered a predicate on a column for which it does not have a histogram: The database needs to have statistics updated.
QUERY_EVENTS table, the combination of
STATEMENT_ID fields uniquely identify the SQL statement that is located in the
This table retains information about query plans, optimization, and execution events. For any unique combination of
STATEMENT_ID, the value of the
REQUEST field contains an SQL request.
REQUEST_TYPEcolumn contains the type of the statement (
DDL, or other).
REQUESTcolumn contains the text of the SQL statement.
SUCCESScolumn contains a Boolean value indicating whether the query executed properly. Errors are logged in the
START_TIMESTAMPcolumn contains the beginning timestamp for the logged event.
END_TIMESTAMPcolumn contains the ending timestamp for the logged event.