SHOW ANALYZE

You are viewing an old version of this article. View the current version here.

Syntax

SHOW ANALYZE [FORMAT=JSON] FOR <connection_id>;

Description

SHOW ANALYZE allows to get ANALYZE output of a currently running statement.

The command

SHOW ANALYZE [FORMAT=JSON] FOR <connection_id>;

connects to the query running in connection connection_id, gets information about the query plan it is executing, also gets information about the runtime statistics of the execution so far and prints it to the output in a form that ANALYZE command would produce.

This is similar to SHOW EXPLAIN command, the difference is that SHOW ANALYZE prints query plan with runtime statistics.

Intended usage

Imagine you're trying to troubleshoot a query that never finishes. Since it doesn't finish, it is not possible to get ANALYZE output for it. With SHOW ANALYZE, you can get the runtime statistics without waiting for the query to finish.

See also

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.