JAEN

SQL

スロークエリログ

SafeSlow query logging

SET GLOBAL slow_query_log = ON;

Records queries over a threshold — set long_query_time around 1 s and gather evidence before tuning.

Examples

  • SHOW VARIABLES LIKE 'slow_query%';Logging state and file path

Syntax

SET GLOBAL slow_query_log=ON; SET GLOBAL long_query_time=1; / SHOW VARIABLES LIKE 'slow%';

Before you run it

Logging only; adds some I/O.

Related commands

The same reference, with no signal at all

Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.

Get it free on the App Store