Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space ML1 and version 9.2

...

Query TypeDescription
ALTER CLUSTERChanges made to your cluster via the ALTER CLUSTER command are always logged to the query.log automatically. This logging is not controlled by a global variable.
BADThe query read reads more rows than necessary to return the expected results. This may indicate a bad plan or missing index. Logging of BAD queries is not enabled by default (session_log_bad_queries).
DDLThe query is DDL (i.e. schema change such as CREATE, DROP, ALTER), or a SET GLOBAL or SESSION command. All DDL queries are initially logged by default (session_log_ddl).
SLOWQuery execution time exceeded the threshold specified by the variable session_log_slow_threshold_ms. This is enabled by default (session_log_slow_queries) and a value of 20 seconds is considered SLOW.
SQLERRThese database errors are things such as syntax errors, timeout notifications, and permission issues. All SQLERR queries will be logged by default (session_log_error_queries).

Global and Session Variables

...

NameDescriptionDefault ValueSession Variable
session_log_bad_queriesLog BAD queries to the query.log.false

(tick)

session_log_ddlLog DDL statements to query.log.true 
session_log_error_queriesLog ERROR statements to query.log.true 
session_log_slow_queriesLog SLOW statements to query.log.true 
session_log_slow_threshold_msQuery duration threshold in milliseconds before logging this query.2000010000

(tick)

session_log_usersLog users and LOGIN/LOGOUT to user.log.false 

See User Logging for additional information on session_log_users.

Anchor
Reading_the_query.log
Reading_the_query.log
Reading the query.log

...

LabelDescription
reads  The number of times the database reads from a container. This may differ from the number of rows_read.
inserts  The number of times the database inserts into a container. This includes both the number of calls and the number of rows written.
deletes  The number of times the database deletes from a container. This includes both the number of calls and the number of rows deleted.
updates  The number of times the database updates a container. This includes both the number of calls and the number of rows updated.
counts  Number of calls by the query execution engine to operators BARRIER_ADD and BARRIER_FETCHADD.
rows_read  

Total number of rows read to get all needed data for the query, including reads from indices. Essentially, the total number of rows processed by the last query. This may differ from from the number of rows_output by the query.

forwardsNumber of rows forwarded to specific nodes.
broadcasts  Number of rows that were broadcast to all nodes.
rows_output  Total number of rows returned or output by the last query. This is usually the same as the number of rows returned from a query but may occasionally contain counts from internal processes.
semaphore_matches  Number of calls by the query execution engine to operator SEM_ACQUIRE.
fragment_executions  Number of query fragments executed for the query.
cpu_runtime_ns  This represents the aggregate total CPU time spent by all nodes to run the query.
cpu_waits  The number of times the query waited for another query to finish due to the Fair Scheduler.
cpu_waittime_ns  The amount of time spent waiting for CPU due to the Fair Scheduler.
barriers  Number of barriers created for the query. This is used to synchronize message communication between nodes.
barrier_forwards  Number of barriers created to synchronize messaging for forwarded rows.
barrier_flushes  Number of flush operations performed on barriers.
bm_fixes  Number of attempted page fixes by the Buffer Manager.
bm_loads  Number of pages loaded from disk by the Buffer Manager.
bm_waittime_ns  Nanoseconds spent blocked on Buffer Manager page fixes.
lockman_waits  Count of the number of times that the query had to wait for a lock to be released by another query.
lockman_waittime_ms  The total time spent waiting for other queries to release locks on needed rows.
trxstate_waits  Number of calls to trxstate_check that had to block.
trxstate_waittime_ms   Milliseconds spent blocked in trxstate_check.
wal_perm_waittime_msMilliseconds spent waiting because the WAL is more than 75% full.
bm_perm_waittime_ms Milliseconds spent waiting for the Buffer Manager to grant write permission for pages.
sigmas  The number of sigma containers used by the query.
sigma_fallbacks  The number of sigma containers that ran out of memory and had to fall back to disk.
row_count  The total number of rows updated, inserted or deleted by the last query.
found_rows  The number of rows affected by the last statement, but not necessarily output by that statement . A value of 0 or -1 means no rows were found.
insert_id  Not currently being used, always displayed as 0.
fanout  Y/N indicator that tells if fanout was used for this query.
attemptsNumber of attempts to automatically retry the query execution after it failed.
Note

When ClustrixDB logs queries to query.log, the semicolon is stripped off. This means that any comments that are included with the statement are not logged.