Skip to main content

Query Audit

Query Audit is a searchable history of query activity in a VeloDB Cloud warehouse. It records details about completed queries, including the SQL statement, user, execution status, duration, resource usage, and the time and client that submitted the query. Use these records when you need to understand what happened after a query ran, rather than monitor a query while it is executing.

Query Audit helps you investigate slow or failed queries, compare query behavior over time, identify workloads that consume significant CPU or memory, and trace a query back to the warehouse user or client that submitted it. Open a query's details to review its execution metadata and, when available, its Query Profile for operator-level performance analysis.

You can filter the history by log type, execution status, and time range, then export the filtered records for further analysis or incident review. Query audit records are retained for the configured number of days and consume storage space. If you disable Query Audit, VeloDB Cloud stops recording new query activity, but existing records remain subject to the retention policy.

Open Query Audit​

  1. Log in to the VeloDB Cloud console.
  2. In the upper-left corner, select the warehouse to inspect.
  3. In the left navigation pane, under OBSERVABILITY, click Query Audit.

Enable Query Audit​

Query Audit is enabled by default. To view or change its configuration:

  1. On the Query Audit page, click Query Audit Configuration in the upper-right corner.
  2. In the dialog, use the Query Audit switch to enable or disable query auditing.
  3. Review the Current audit log size and Log retention days values. The retention setting controls how long audit records are kept. Query audit records are stored in audit log tables and consume storage space.
  4. Click Confirm to apply the change, or click Cancel to close the dialog without saving.

When query auditing is disabled, new query activity is not recorded in the audit log. Existing records remain subject to the configured retention policy.

Find a completed query​

Use the following controls to narrow the query list:

  • Logs: Filter by log type.
  • Status: Filter by execution status.
  • Time: Set the time range to search.

To update the results automatically, select an interval from Refresh Interval, then keep the page open while queries run. Select off to disable automatic refreshes. Use the column chooser to show additional fields when you need more context.

Download query audit records​

  1. Set Logs, Status, and Time to define the records to export.
  2. Click the download or export control above the results table.
  3. Save the generated file when the download completes.

The download uses the current filters and time range. Narrow the time range before exporting a large audit history.

Review query information​

Each row in the query list includes the following information:

FieldDescription
Query IDIdentifier for the query.
SQLThe executed SQL statement.
StatusThe final execution status.
DatabaseThe database used by the query.
UserThe warehouse user that submitted the query.
HostThe client host and port.
Execution DurationTotal time taken to execute the query.
Query Time (browser time zone)Time when the query started. The console displays the time in your browser's time zone.
CPU TimeCPU time consumed by the query.
Peak Memory UsageHighest memory usage during execution.

Inspect a query​

Click a Query ID to open its detail page. The Query Details tab shows the query ID, execution status, user, database, host, execution duration, query time, CPU time, peak memory usage, scanned rows, returned rows, cluster, and SQL statement.

Select Query Profile to review operator-level execution details when a profile is available.

Note:

Non-query statements and failed statements do not have a Query ID.