メインコンテンツまでスキップ
バージョン: 26.x

Audit Event Reference

This reference documents the audit_log table schema and field descriptions. For audit sources and query workflows, see Audit Logging.

Audit Log Table

Database audit records are stored in the audit_log table in the __internal_schema database.

Column nameTypeDescription
query_idvarchar(48)ID of the query.
timedatetime(3)Time when the query was executed, in milliseconds.
client_ipvarchar(128)IP address of the client sending the query.
uservarchar(128)User.
catalogvarchar(128)Current catalog during statement execution.
dbvarchar(128)Current database during statement execution.
statevarchar(128)Execution status of the statement.
error_codeintError code.
error_messagetextError message.
query_timebigintExecution time of the statement.
scan_bytesbigintAmount of data scanned.
scan_rowsbigintNumber of rows scanned.
return_rowsbigintNumber of rows returned.
shuffleSendRowsbigintNumber of rows transferred between nodes during statement execution. Supported since version 3.0.
shuffleSendBytesbigintAmount of data transferred between nodes during statement execution. Supported since version 3.0.
scanBytesFromLocalStoragebigintAmount of data read from local disk. Supported since version 3.0.
scanBytesFromRemoteStoragebigintAmount of data read from remote storage. Supported since version 3.0.
stmt_idbigintStatement ID.
stmt_typestringStatement type. Supported since version 3.0.
is_querytinyintWhether the statement is a query.
is_nereidsbooleanWhether the statement uses the Nereids optimizer.
frontend_ipvarchar(128)IP address of the connected Frontend.
cpu_time_msbigintCumulative Backend CPU time consumed by statement execution, in milliseconds.
sql_hashvarchar(128)Hash value of the statement.
sql_digestvarchar(128)Digest or signature of the statement.
peak_memory_bytesbigintPeak Backend memory usage during statement execution.
workload_grouptextWorkload group used for statement execution.
compute_groupstringCompute group used by the executed statement in storage-compute separation mode. Supported since version 3.0.
trace_idstringTrace ID set when executing the statement. Removed since version 3.0.3.
stmttextStatement text.

Field Notes

  • client_ip: If a proxy service is used and IP pass-through is not enabled, this field may record the proxy service IP instead of the real client IP.
  • state: EOF indicates that the query executed successfully. OK indicates that the DDL or DML statement executed successfully. ERR indicates that statement execution failed.