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
c41ab95a
Commit
c41ab95a
authored
Sep 06, 2024
by
Monty
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove rows and cost from optimizer trace for not usable key parts
parent
886d740a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
mysql-test/main/opt_trace.result
mysql-test/main/opt_trace.result
+0
-2
sql/sql_select.cc
sql/sql_select.cc
+4
-3
No files found.
mysql-test/main/opt_trace.result
View file @
c41ab95a
...
...
@@ -9417,8 +9417,6 @@ S
{
"access_type": "ref",
"index": "PRIMARY",
"rows": 1.79769e308,
"cost": 1.79769e308,
"chosen": false,
"cause": "no predicate for first keypart"
}
...
...
sql/sql_select.cc
View file @
c41ab95a
...
...
@@ -8085,7 +8085,6 @@ best_access_path(JOIN *join,
SplM_plan_info *spl_plan= 0;
table_map spl_pd_boundary= 0;
Range_rowid_filter_cost_info *filter= 0;
const char* cause= NULL;
enum join_type best_type= JT_UNKNOWN, type= JT_UNKNOWN;
disable_jbuf= disable_jbuf || idx == join->const_tables;
...
...
@@ -8113,6 +8112,7 @@ best_access_path(JOIN *join,
TABLE *table= s->table;
double best_records= DBL_MAX;
uint max_key_part=0;
const char *cause= NULL;
/* Test how we can use keys */
rec= s->records/MATCHING_ROWS_IN_OTHER_TABLE; // Assumed records/key
...
...
@@ -8661,7 +8661,9 @@ best_access_path(JOIN *join,
table->key_info[filter->key_no].name);
}
}
trace_access_idx.add("rows", records).add("cost", tmp);
if (!cause)
trace_access_idx.add("rows", records).add("cost", tmp);
if (tmp + 0.0001 < best_time - records/TIME_FOR_COMPARE)
{
...
...
@@ -8680,7 +8682,6 @@ best_access_path(JOIN *join,
trace_access_idx.add("chosen", false)
.add("cause", cause ? cause : "cost");
}
cause= NULL;
} /* for each key */
records= best_records;
}
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