Re: [Maria-developers] MDEV-6111: Optimizer trace: on the first output
On Tue, Jun 12, 2018 at 07:40:08AM +0800, zhzhzoo zhang wrote:
I've done condition processing and some range analysis. and for the test input ( https://dev.mysql.com/doc/internals/en/tracing-example.html), It now outputs something like
(not very readable from the email so I've made two pastes, from the current tree and from MySQL 8): https://gist.github.com/spetrunia/cb4a1a382a9e81a60491d524dbfc08f6 https://gist.github.com/spetrunia/62347cc3bf26e003909a32b378b6684f
```{ "join_optimization": { "select #": 1, "steps": { "inner": { "select #": 1,
Two 'select #' :1 seem to be redundant. There are also two nested "steps" elements which seem redundant as well.
"steps": [ { "condition_processing": { "condition": "WHERE", "original_condition": "`test`.`alias1`.`pk` <> 0 and `test`.`alias2`.`pk` = `test`.`alias1`.`col_int_key`", "steps": [ { "transformation": "equality_propagation", "subselect_evaluation": [], "resulting_condition": "`test`.`alias1`.`pk` <> 0 and multiple equal(`test`.`alias2`.`pk`, `test`.`alias1`.`col_int_key`)???"
What are the "???" at the end? Please get them removed. also, if you check EXPLAIN FORMAT=JSON output, it prints conditions without overquoting, like so: "attached_condition": "alias1.pk <> 0 and alias1.col_int_key is not null" This is done by using QT_EXPLAIN parameter: item->print(&str, QT_EXPLAIN); Let's print them this way here as well.
}, { "transformation": "constant_propagation", "subselect_evaluation": [], "resulting_condition": "`test`.`alias1`.`pk` <> 0 and multiple equal(`test`.`alias2`.`pk`, `test`.`alias1`.`col_int_key`)???" },
BR Sergei -- Sergei Petrunia, Software Developer MariaDB Corporation | Skype: sergefp | Blog: http://s.petrunia.net/blog
participants (1)
-
Sergey Petrunia