1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Added r_table_loops to "ANALYZE FORMAT=JSON statement"

Author: Sergei Petrunia <sergey@mariadb.com>
This commit is contained in:
Monty
2023-02-12 15:19:58 +02:00
committed by Sergei Petrunia
parent 3c1b7fb03e
commit 793caf3a27
4 changed files with 16 additions and 1 deletions

View File

@@ -1922,7 +1922,15 @@ void Explain_table_access::print_explain_json(Explain_query *query,
/* r_loops (not present in tabular output) */
if (is_analyze)
{
writer->add_member("r_loops").add_ll(tracker.get_loops());
ha_rows loops= tracker.get_loops();
writer->add_member("r_loops").add_ll(loops);
if (type == JT_EQ_REF) // max one row
{
ha_rows table_loops= op_tracker.get_loops();
if (table_loops != loops)
writer->add_member("r_table_loops").add_ll(table_loops);
}
}
/* `rows` */