Slow Queries
插件本地插件稳定版

Slow Queries

local_slow_queriesEduardo Kraus

  • Moodle 1.9–5.1
  • 中文 61%
  • 更新 2026-11-01

An admin-only plugin that turns your mdl_log_queries table into a practical UI to find, triage, and analyze slow SQL statements executed by Moodle.
local_slow_queries   is an admin-only plugin that turns your   mdl_log_queries   table into a practical UI to   find, triage and analyze slow SQL statements   executed by Moodle.
It focuses on three daily workflows:
List & filter   slow queries quickly (default   exectime > 3s ).
Open details   with SQL + parameters and a ready-to-use   ChatGPT prompt   including table schemas.
Use dashboards   to see patterns: top slowest, recurrence, distribution, CRON vs WEB, by qtype, and errors.
Access is restricted to:   require_capability(“moodle/site:config”, context_system::instance())
Data source
The plugin reads from:
Table:   mdl_log_queries
Fields used by the UI:
id   — unique identifier
qtype   — query type (stored by your logger)
sqltext   — SQL statement text
sqlparams   — parameters (string representation)
error   — non-zero marks error
info   — optional extra data
backtrace   — string backtrace
exectime   — decimal seconds
timelogged   — unix timestamp

返回插件目录