Vertica enables you to check last query executed in specific time range
Query
Query below lists queries executed between 24 and 12 hour ago from current time.
select session_id,
user_name,
node_name,
request_type,
request,
start_timestamp,
end_timestamp,
request_duration_ms as duration_ms,
success
from v_monitor.query_requests
where start_timestamp < current_timestamp - interval '12' hour
and start_timestamp > current_timestamp - interval '24' hour
order by start_timestamp desc;
Columns
- session_id - session id
- user_name - name of user who executed query
- node_name - name of node in which query was executed
- request_type - type of executed statement
- QUERY
- DDL
- LOAD
- UTILITY
- TRANSACTION
- PREPARE
- EXECUTE
- SET
- SHOW
- request - query text
- start_timestamp - start time of query
- end_timestamp - end time of query
- duration_ms - duration of the query in miliseconds
- success - indicate if query executed successfully
Rows
- One row represents one query executed in specifiic time range
- Scope of rows: all queries executed in specifiic time range
- Ordered by start time of query descending