HomeMogDBMogDB StackUqbar
v5.0

Documentation:v5.0

Supported Versions:

Other Versions:

SQL Tracing

Availability

This feature is available since MogDB 3.1.0.

Introduction

MogDB SQL Trace is an enhanced advanced feature designed to provide the ability to dynamically export and observe SQL runs in the MogDB database. This feature focuses on observability enhancements that make it easier to observe and troubleshoot business-critical systems without downtime.

Benefits

With MogDB SQL Trace, users can monitor and record the SQL execution process in real-time, including the execution time of SQL statements, execution plan, IO operations, locks and other key information. This information helps users gain insight into SQL performance bottlenecks and potential problems, and provides data support for troubleshooting and performance optimization.

Description

This feature is an enhancement to the gstrace tool. It supports tracing all SQL trace information without stopping the library in production, tracing one or up to 8 sessions or tracing one or up to 8 threads, and exporting the trace information for later analysis and diagnosis. Users can enable, export and disable the SQL trace function of gstrace.

The contents of SQL trace export include:

  • Basic information related to machine and database, total execution time of PARSE (parse) and EXEC (execute) statements, as well as the execution time and number of execution entries of the main operators SCAN and SORT AGGREGATE.
  • Total time information for OPTIMIZER, i.e., information starting with "OPTIMIZER + #session_id".
  • Waiting for event information, such as IO and locks (normal and light locks).
  • Waiting status information, such as network communication, lock waiting related, and writing file related status information during sql execution.
  • Waiting for event or wait state information, you must enable the real-time collection of wait event information parameter enable_instr_track_wait.

gstrace, enable_instr_track_waite

Copyright © 2011-2024 www.enmotech.com All rights reserved.