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
58b21478
Commit
58b21478
authored
Mar 14, 2012
by
Mattias Jonsson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug#13694811
Updated code comments according to reviewers requests.
parent
8325fe02
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
10 deletions
+4
-10
sql/ha_partition.cc
sql/ha_partition.cc
+4
-10
No files found.
sql/ha_partition.cc
View file @
58b21478
...
...
@@ -6164,6 +6164,7 @@ const key_map *ha_partition::keys_to_use_for_scanning()
DBUG_RETURN
(
m_file
[
0
]
->
keys_to_use_for_scanning
());
}
/**
Minimum number of rows to base optimizer estimate on.
*/
...
...
@@ -6171,14 +6172,14 @@ const key_map *ha_partition::keys_to_use_for_scanning()
ha_rows
ha_partition
::
min_rows_for_estimate
()
{
uint
i
,
max_used_partitions
,
tot_used_partitions
;
DBUG_ENTER
(
"ha_partition::
partitions_optimizer_call_preparations
"
);
DBUG_ENTER
(
"ha_partition::
min_rows_for_estimate
"
);
tot_used_partitions
=
bitmap_bits_set
(
&
m_part_info
->
used_partitions
);
DBUG_ASSERT
(
tot_used_partitions
);
/*
Allow O(log2(tot_partitions)) increase in number of used partitions.
This gives O(
1/log2(tot_partitions)) of
rows to base the estimate on.
This gives O(
tot_rows/log2(tot_partitions))
rows to base the estimate on.
I.e when the total number of partitions doubles, allow one more
partition to be checked.
*/
...
...
@@ -6265,15 +6266,8 @@ double ha_partition::scan_time()
@return Number of rows in range.
Given a starting key, and an ending key estimate the number of rows that
will exist between the two.
end
_key may be empty which in case determine
will exist between the two.
max
_key may be empty which in case determine
if start_key matches any rows.
Called from opt_range.cc by check_quick_keys().
@note
monty: MUST be called for each range and added.
Note that MySQL will assume that if this returns 0 there is no
matching rows for the range!
*/
ha_rows
ha_partition
::
records_in_range
(
uint
inx
,
key_range
*
min_key
,
...
...
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