summaryrefslogtreecommitdiff
path: root/mysql-test/main/opt_trace.result
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2022-01-20 15:49:01 +0200
committerSergei Petrunia <sergey@mariadb.com>2023-02-02 20:53:59 +0300
commit766bae2b3116bb0805e3448dbfcfa892bb6cb707 (patch)
tree41bfb99a2ad9a6975041c27d590dfa8b23a345c6 /mysql-test/main/opt_trace.result
parentec6aa2829ab88a3cde697c78355b0478ee0ff337 (diff)
downloadmariadb-git-766bae2b3116bb0805e3448dbfcfa892bb6cb707.tar.gz
Make trace.add() usage uniform
- Before any multiple add() calls, always use (if trace_started()). - Add unlikely() around all tests of trace_started(). - Change trace.add(); trace.add(); to trace.add().add(); - When trace.add() goes over several line, use the following formating: trace. add(xxx). add(yyy). add(zzz); This format was choosen after a discussion between Sergei Petrunia and me as it looks similar indepedent if 'trace' is an object or a pointer. It also more suitable for an editors auto-indentation. Other things: Added DBUG_ASSERT(thd->trace_started()) to a few functions that should only be called if trace is enabled. "use_roworder_index_merge: true" changed to "use_sort_index_merge: false" As the original output was often not correct. Also fixed the related 'cause' to be correct. In best_access_path() print the cost (and number of rows) before checking if it the plan should be used. This removes the need to print the cost in two places. Changed a few "read_time" tags to "cost".
Diffstat (limited to 'mysql-test/main/opt_trace.result')
-rw-r--r--mysql-test/main/opt_trace.result23
1 files changed, 18 insertions, 5 deletions
diff --git a/mysql-test/main/opt_trace.result b/mysql-test/main/opt_trace.result
index c859c1de513..331021b1948 100644
--- a/mysql-test/main/opt_trace.result
+++ b/mysql-test/main/opt_trace.result
@@ -1117,6 +1117,7 @@ explain select * from t1,t2 where t1.a=t2.b+2 and t2.a= t1.b {
"rows": 1,
"cond_check_cost": 2.200585794,
"startup_cost": 0,
+ "rows_after_filter": 1,
"cost": 220.0585794,
"chosen": true
},
@@ -1166,6 +1167,7 @@ explain select * from t1,t2 where t1.a=t2.b+2 and t2.a= t1.b {
"rows": 1,
"cond_check_cost": 2.200585794,
"startup_cost": 0,
+ "rows_after_filter": 1,
"cost": 220.0585794,
"chosen": true
},
@@ -2265,6 +2267,7 @@ explain select * from t1 where a=1 and b=2 order by c limit 1 {
"rows": 180,
"cond_check_cost": 216.2743776,
"startup_cost": 0,
+ "rows_after_filter": 180,
"cost": 216.2743776,
"chosen": true
},
@@ -2275,6 +2278,7 @@ explain select * from t1 where a=1 and b=2 order by c limit 1 {
"rows": 21,
"cond_check_cost": 25.34242739,
"startup_cost": 0,
+ "rows_after_filter": 21,
"cost": 25.34242739,
"chosen": true
},
@@ -2724,6 +2728,7 @@ explain select * from t1 left join t2 on t2.a=t1.a {
"rows": 1,
"cond_check_cost": 1.2,
"startup_cost": 0,
+ "rows_after_filter": 1,
"cost": 4.8,
"chosen": true
},
@@ -3253,7 +3258,7 @@ explain extended select * from t1 where a in (select pk from t10) {
{
"strategy": "SJ-Materialization",
"records": 3,
- "read_time": 7.878564453
+ "cost": 7.878564453
},
{
"strategy": "DuplicateWeedout",
@@ -3628,6 +3633,7 @@ explain select * from t1 where pk = 2 and a=5 and b=1 {
"rows": 1,
"cond_check_cost": 1.325585794,
"startup_cost": 0,
+ "rows_after_filter": 1,
"cost": 1.325585794,
"chosen": true
},
@@ -3638,6 +3644,7 @@ explain select * from t1 where pk = 2 and a=5 and b=1 {
"rows": 1,
"cond_check_cost": 1.325829876,
"startup_cost": 0,
+ "rows_after_filter": 1,
"cost": 1.325829876,
"chosen": false,
"cause": "cost"
@@ -3649,6 +3656,7 @@ explain select * from t1 where pk = 2 and a=5 and b=1 {
"rows": 1,
"cond_check_cost": 0.326073957,
"startup_cost": 0,
+ "rows_after_filter": 1,
"cost": 0.326073957,
"chosen": true
},
@@ -4341,6 +4349,7 @@ explain delete t0,t1 from t0, t1 where t0.a=t1.a and t1.a<3 {
"rows": 1,
"cond_check_cost": 1.200585794,
"startup_cost": 0,
+ "rows_after_filter": 1,
"cost": 3.601757383,
"chosen": true
},
@@ -4390,6 +4399,7 @@ explain delete t0,t1 from t0, t1 where t0.a=t1.a and t1.a<3 {
"rows": 2,
"cond_check_cost": 1.401171589,
"startup_cost": 0,
+ "rows_after_filter": 2,
"cost": 4.203514767,
"chosen": true
},
@@ -5080,7 +5090,7 @@ explain select * from t1 where a in (select t_inner_1.a from t1 t_inner_1, t1 t_
{
"strategy": "SJ-Materialization",
"records": 3,
- "read_time": 10.81538086
+ "cost": 10.81538086
},
{
"strategy": "DuplicateWeedout",
@@ -7976,7 +7986,7 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"strategy": "SJ-Materialization",
"records": 27,
- "read_time": 32.34101562
+ "cost": 32.34101562
},
{
"strategy": "DuplicateWeedout",
@@ -8098,7 +8108,7 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"strategy": "SJ-Materialization",
"records": 27,
- "read_time": 46.86152344
+ "cost": 46.86152344
},
{
"strategy": "DuplicateWeedout",
@@ -8395,7 +8405,7 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"strategy": "SJ-Materialization",
"records": 3,
- "read_time": 16.52563477
+ "cost": 16.52563477
},
{
"strategy": "DuplicateWeedout",
@@ -9539,6 +9549,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans'))
"rows": 1,
"cond_check_cost": 2.200585794,
"startup_cost": 0,
+ "rows_after_filter": 1,
"cost": 22.00585794,
"chosen": true
},
@@ -9769,6 +9780,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans'))
"rows": 1,
"cond_check_cost": 2.200585794,
"startup_cost": 0,
+ "rows_after_filter": 1,
"cost": 22.00585794,
"chosen": true
},
@@ -10408,6 +10420,7 @@ json_detailed(json_extract(trace, '$**.choose_best_splitting'))
"rows": 1.8367,
"cond_check_cost": 2.367925794,
"startup_cost": 0,
+ "rows_after_filter": 1.8367,
"cost": 2.367925794,
"chosen": true
},