Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
793caf3a
Commit
793caf3a
authored
Feb 12, 2023
by
Monty
Committed by
Sergei Petrunia
Feb 21, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added r_table_loops to "ANALYZE FORMAT=JSON statement"
Author: Sergei Petrunia <sergey@mariadb.com>
parent
3c1b7fb0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
1 deletion
+16
-1
mysql-test/main/rowid_filter.result
mysql-test/main/rowid_filter.result
+1
-0
mysql-test/main/rowid_filter_aria.result
mysql-test/main/rowid_filter_aria.result
+4
-0
mysql-test/main/rowid_filter_innodb.result
mysql-test/main/rowid_filter_innodb.result
+2
-0
sql/sql_explain.cc
sql/sql_explain.cc
+9
-1
No files found.
mysql-test/main/rowid_filter.result
View file @
793caf3a
...
@@ -592,6 +592,7 @@ ANALYZE
...
@@ -592,6 +592,7 @@ ANALYZE
"ref": ["dbt3_s001.lineitem.l_orderkey"],
"ref": ["dbt3_s001.lineitem.l_orderkey"],
"loops": 98,
"loops": 98,
"r_loops": 98,
"r_loops": 98,
"r_table_loops": 96,
"rows": 1,
"rows": 1,
"r_rows": 1,
"r_rows": 1,
"cost": "REPLACED",
"cost": "REPLACED",
...
...
mysql-test/main/rowid_filter_aria.result
View file @
793caf3a
...
@@ -450,6 +450,7 @@ ANALYZE
...
@@ -450,6 +450,7 @@ ANALYZE
},
},
"loops": 92,
"loops": 92,
"r_loops": 98,
"r_loops": 98,
"r_table_loops": 96,
"rows": 1,
"rows": 1,
"r_rows": 0.112244898,
"r_rows": 0.112244898,
"cost": "REPLACED",
"cost": "REPLACED",
...
@@ -593,6 +594,7 @@ ANALYZE
...
@@ -593,6 +594,7 @@ ANALYZE
"ref": ["dbt3_s001.lineitem.l_orderkey"],
"ref": ["dbt3_s001.lineitem.l_orderkey"],
"loops": 92,
"loops": 92,
"r_loops": 98,
"r_loops": 98,
"r_table_loops": 96,
"rows": 1,
"rows": 1,
"r_rows": 1,
"r_rows": 1,
"cost": "REPLACED",
"cost": "REPLACED",
...
@@ -765,6 +767,7 @@ ANALYZE
...
@@ -765,6 +767,7 @@ ANALYZE
"ref": ["dbt3_s001.lineitem.l_orderkey"],
"ref": ["dbt3_s001.lineitem.l_orderkey"],
"loops": 56.90890924,
"loops": 56.90890924,
"r_loops": 34,
"r_loops": 34,
"r_table_loops": 33,
"rows": 1,
"rows": 1,
"r_rows": 1,
"r_rows": 1,
"cost": "REPLACED",
"cost": "REPLACED",
...
@@ -915,6 +918,7 @@ ANALYZE
...
@@ -915,6 +918,7 @@ ANALYZE
"ref": ["dbt3_s001.lineitem.l_orderkey"],
"ref": ["dbt3_s001.lineitem.l_orderkey"],
"loops": 56.90890924,
"loops": 56.90890924,
"r_loops": 34,
"r_loops": 34,
"r_table_loops": 33,
"rows": 1,
"rows": 1,
"r_rows": 1,
"r_rows": 1,
"cost": "REPLACED",
"cost": "REPLACED",
...
...
mysql-test/main/rowid_filter_innodb.result
View file @
793caf3a
...
@@ -433,6 +433,7 @@ ANALYZE
...
@@ -433,6 +433,7 @@ ANALYZE
"ref": ["dbt3_s001.lineitem.l_orderkey"],
"ref": ["dbt3_s001.lineitem.l_orderkey"],
"loops": 98,
"loops": 98,
"r_loops": 98,
"r_loops": 98,
"r_table_loops": 96,
"rows": 1,
"rows": 1,
"r_rows": 1,
"r_rows": 1,
"cost": "REPLACED",
"cost": "REPLACED",
...
@@ -578,6 +579,7 @@ ANALYZE
...
@@ -578,6 +579,7 @@ ANALYZE
"ref": ["dbt3_s001.lineitem.l_orderkey"],
"ref": ["dbt3_s001.lineitem.l_orderkey"],
"loops": 98,
"loops": 98,
"r_loops": 98,
"r_loops": 98,
"r_table_loops": 96,
"rows": 1,
"rows": 1,
"r_rows": 1,
"r_rows": 1,
"cost": "REPLACED",
"cost": "REPLACED",
...
...
sql/sql_explain.cc
View file @
793caf3a
...
@@ -1922,7 +1922,15 @@ void Explain_table_access::print_explain_json(Explain_query *query,
...
@@ -1922,7 +1922,15 @@ void Explain_table_access::print_explain_json(Explain_query *query,
/* r_loops (not present in tabular output) */
/* r_loops (not present in tabular output) */
if
(
is_analyze
)
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` */
/* `rows` */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment