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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
cbd57af8
Commit
cbd57af8
authored
Jul 30, 2006
by
sergefp@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG#14940: post-review fixes
parent
699291a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
sql/opt_range.cc
sql/opt_range.cc
+8
-6
No files found.
sql/opt_range.cc
View file @
cbd57af8
...
...
@@ -1872,14 +1872,17 @@ static int fill_used_fields_bitmap(PARAM *param)
correlations between sets of rows they will return.
For example, if values of tbl.key1 and tbl.key2 are independent (a right
assumption if we have no inf
ro
mation about their correlation) then the
assumption if we have no inf
or
mation about their correlation) then the
correct estimate will be:
E(#rows("tbl.key1 < c1 AND tbl.key2 < c2")) =
= E(#rows(tbl.key1 < c1)) / total_rows(tbl) * E(#rows(tbl.key2 < c2) /
total_rows(tbl).
= E(#rows(tbl.key1 < c1)) / total_rows(tbl) * E(#rows(tbl.key2 < c2)
which is smaller than MIN(rows(tbl.key1 < c1), rows(tbl.key2 < c2)).
which is smaller than
MIN(E(#rows(tbl.key1 < c1), E(#rows(tbl.key2 < c2)))
which is currently produced.
TODO
* Change the value returned in quick_condition_rows from a pessimistic
...
...
@@ -4469,8 +4472,7 @@ TRP_ROR_INTERSECT *get_best_covering_ror_intersect(PARAM *param,
trp
->
read_cost
=
total_cost
;
trp
->
records
=
records
;
trp
->
cpk_scan
=
NULL
;
if
(
records
<
param
->
table
->
quick_condition_rows
)
param
->
table
->
quick_condition_rows
=
records
;
set_if_smaller
(
param
->
table
->
quick_condition_rows
,
records
);
DBUG_PRINT
(
"info"
,
(
"Returning covering ROR-intersect plan: cost %g, records %lu"
,
...
...
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