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
d0b74bba
Commit
d0b74bba
authored
Sep 12, 2019
by
Sergei Petrunia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-20440: Optimizer trace: print more details about semi-join optimization
Followup patch: fix typos
parent
60c04be6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
8 deletions
+17
-8
mysql-test/main/opt_trace.result
mysql-test/main/opt_trace.result
+12
-5
sql/opt_subselect.cc
sql/opt_subselect.cc
+5
-3
No files found.
mysql-test/main/opt_trace.result
View file @
d0b74bba
...
...
@@ -2970,7 +2970,7 @@ explain extended select * from t1 where a in (select pk from t10) {
"read_time": 27.129
},
{
"chosen_strategy": "SJ-Materializ
e
"
"chosen_strategy": "SJ-Materializ
ation
"
}
],
"estimated_join_cardinality": 3
...
...
@@ -4609,7 +4609,7 @@ explain select * from t1 where a in (select t_inner_1.a from t1 t_inner_1, t1 t_
"read_time": 18.315
},
{
"chosen_strategy": "SJ-Materializ
e
"
"chosen_strategy": "SJ-Materializ
ation
"
}
],
"estimated_join_cardinality": 3
...
...
@@ -6309,7 +6309,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
]
},
{
"fix_semijoin_strategies_for_picked_join_order": []
"fix_semijoin_strategies_for_picked_join_order": [
{
"semi_join_strategy": "DuplicateWeedout"
},
{
"semi_join_strategy": "DuplicateWeedout"
}
]
},
{
"best_join_order": [
...
...
@@ -6833,7 +6840,7 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
"read_time": 37.226
},
{
"chosen_strategy": "SJ-Materializ
e
"
"chosen_strategy": "SJ-Materializ
ation
"
}
],
"rest_of_plan": [
...
...
@@ -6935,7 +6942,7 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
"read_time": 294.96
},
{
"chosen_strategy": "SJ-Materializ
e
"
"chosen_strategy": "SJ-Materializ
ation
"
}
],
"estimated_join_cardinality": 27
...
...
sql/opt_subselect.cc
View file @
d0b74bba
...
...
@@ -2938,10 +2938,10 @@ void advance_sj_state(JOIN *join, table_map remaining_tables, uint idx,
const
char
*
sname
;
switch
(
pos
->
sj_strategy
)
{
case
SJ_OPT_MATERIALIZE
:
sname
=
"SJ-Materializ
e
"
;
sname
=
"SJ-Materializ
ation
"
;
break
;
case
SJ_OPT_MATERIALIZE_SCAN
:
sname
=
"SJ-Materializ
e
-Scan"
;
sname
=
"SJ-Materializ
ation
-Scan"
;
break
;
case
SJ_OPT_FIRST_MATCH
:
sname
=
"FirstMatch"
;
...
...
@@ -3203,7 +3203,7 @@ bool LooseScan_picker::check_qep(JOIN *join,
(
new_join_tab
->
table
->
map
&
loosescan_need_tables
))
{
Json_writer_object
trace
(
join
->
thd
);
trace
.
add
(
"strategy"
,
"
SJ-Materialization-
Scan"
);
trace
.
add
(
"strategy"
,
"
Loose
Scan"
);
/*
Ok we have LooseScan plan and also have all LooseScan sj-nest's
inner tables and outer correlated tables into the prefix.
...
...
@@ -3899,6 +3899,8 @@ void fix_semijoin_strategies_for_picked_join_order(JOIN *join)
if
(
pos
->
sj_strategy
==
SJ_OPT_DUPS_WEEDOUT
)
{
Json_writer_object
semijoin_strategy
(
thd
);
semijoin_strategy
.
add
(
"semi_join_strategy"
,
"DuplicateWeedout"
);
/*
Duplicate Weedout starting at pos->first_dupsweedout_table, ending at
this table.
...
...
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