ANALYZE FORMAT=JSON

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

ANALYZE FORMAT=JSON is a mix of the EXPLAIN FORMAT=JSON and ANALYZE statement features. ANALYZE FORMAT=JSON $statement will execute $statement, and then print the output of EXPLAIN FORMAT=JSON, amended with the data from query execution.

Difference from ANALYZE statement

ANALYZE FORMAT=JSON prints more details about the query plan. The most important parts are

  • Most query plan elements have r_loops field. It shows how many times the node was executed.
  • Another field, r_total_time_ms shows how much time in total was spent executing this node. If the node has subnodes, their execution time is included.

Use cases

See Examples of ANALYZE FORMAT=JSON.

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.