Skip to main content

audit_log

Overview​

Store audit logs

Database​

__internal_schema

Table Information​

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
shuffleSendRowsbigintThe number of rows transferred between nodes during statement execution. Supported since version 3.0.
shuffleSendBytesbigintThe amount of data transferred between nodes during statement execution. Supported since version 3.0.
scanBytesFromLocalStoragebigintThe amount of data read from the local disk. Supported since version 3.0.
scanBytesFromRemoteStoragebigintThe amount of data read from the remote storage. Supported since version 3.0.
stmt_idbigintStatement ID
stmt_typestringStatement type. Supported since version 3.0.
is_querytinyintWhether it is a query
is_nereidsbooeanIs using Nereids Optimizer.
frontend_ipvarchar(128)IP address of the connected Frontend
cpu_time_msbigintCumulative CPU time (in milliseconds) consumed by the Backend for statement execution
sql_hashvarchar(128)Hash value of the statement
sql_digestvarchar(128)Digest (signature) of the statement
peak_memory_bytesbigintPeak memory usage of the Backend during statement execution
workload_grouptextWorkload Group used for statement execution
compute_groupstringIn storage and computation decouped mode, the compute group used by the execution statement. Supported since version 3.0.
trace_idstringTrace ID set when executing the statement
stmttextStatement text

Description​

  • client_ip: If a proxy service is used and the IP pass-through is not enabled, the proxy service IP may be recorded here instead of the real client IP.
  • state: EOF indicates that the query is executed successfully. OK indicates that the DDL and DML statements are executed successfully. ERR indicates that the statement execution fails.