diff options
author | Monty <monty@mariadb.org> | 2022-01-20 15:49:01 +0200 |
---|---|---|
committer | Sergei Petrunia <sergey@mariadb.com> | 2023-02-02 20:53:59 +0300 |
commit | 766bae2b3116bb0805e3448dbfcfa892bb6cb707 (patch) | |
tree | 41bfb99a2ad9a6975041c27d590dfa8b23a345c6 /mysql-test/main/opt_trace_selectivity.result | |
parent | ec6aa2829ab88a3cde697c78355b0478ee0ff337 (diff) | |
download | mariadb-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_selectivity.result')
-rw-r--r-- | mysql-test/main/opt_trace_selectivity.result | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mysql-test/main/opt_trace_selectivity.result b/mysql-test/main/opt_trace_selectivity.result index 86290a631fd..44f4ad9bb90 100644 --- a/mysql-test/main/opt_trace_selectivity.result +++ b/mysql-test/main/opt_trace_selectivity.result @@ -51,6 +51,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans')) "rows": 104, "cond_check_cost": 124.96562, "startup_cost": 0, + "rows_after_filter": 104, "cost": 124.96562, "chosen": true }, @@ -61,6 +62,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans')) "rows": 340, "cond_check_cost": 408.2577963, "startup_cost": 0, + "rows_after_filter": 340, "cost": 408.2577963, "chosen": false, "cause": "cost" @@ -72,6 +74,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans')) "rows": 632, "cond_check_cost": 758.7718449, "startup_cost": 0, + "rows_after_filter": 632, "cost": 758.7718449, "chosen": false, "cause": "cost" @@ -145,6 +148,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans')) "rows": 6, "cond_check_cost": 7.327343464, "startup_cost": 0, + "rows_after_filter": 6, "cost": 7.327343464, "chosen": true }, @@ -155,6 +159,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans')) "rows": 232, "cond_check_cost": 278.6156139, "startup_cost": 0, + "rows_after_filter": 232, "cost": 278.6156139, "chosen": false, "cause": "cost" @@ -166,6 +171,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans')) "rows": 293, "cond_check_cost": 351.8394392, "startup_cost": 0, + "rows_after_filter": 293, "cost": 351.8394392, "chosen": false, "cause": "cost" |