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
b91173af
Commit
b91173af
authored
Oct 18, 2005
by
sergefp@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG#12915: post-review fixes
parent
e9f2f943
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
13 deletions
+18
-13
sql/opt_range.cc
sql/opt_range.cc
+7
-5
sql/records.cc
sql/records.cc
+11
-8
No files found.
sql/opt_range.cc
View file @
b91173af
...
@@ -584,8 +584,7 @@ SEL_ARG *SEL_ARG::clone_tree()
...
@@ -584,8 +584,7 @@ SEL_ARG *SEL_ARG::clone_tree()
/*
/*
Find an index that allows to retrieve first #limit records in the given
Find the best index to retrieve first N records in given order
order cheaper then one would retrieve them using full table scan.
SYNOPSIS
SYNOPSIS
get_index_for_order()
get_index_for_order()
...
@@ -594,10 +593,13 @@ SEL_ARG *SEL_ARG::clone_tree()
...
@@ -594,10 +593,13 @@ SEL_ARG *SEL_ARG::clone_tree()
limit Number of records that will be retrieved
limit Number of records that will be retrieved
DESCRIPTION
DESCRIPTION
Find the best index that allows to retrieve first #limit records in the
given order cheaper then one would retrieve them using full table scan.
IMPLEMENTATION
Run through all table indexes and find the shortest index that allows
Run through all table indexes and find the shortest index that allows
records to be retrieved in given order. If there is such index and
records to be retrieved in given order. We look for the shortest index
reading first #limit records from it is cheaper then scanning the entire
as we will have fewer index pages to read with it.
table, return it.
This function is used only by UPDATE/DELETE, so we take into account how
This function is used only by UPDATE/DELETE, so we take into account how
the UPDATE/DELETE code will work:
the UPDATE/DELETE code will work:
...
...
sql/records.cc
View file @
b91173af
...
@@ -235,13 +235,16 @@ static int rr_quick(READ_RECORD *info)
...
@@ -235,13 +235,16 @@ static int rr_quick(READ_RECORD *info)
/*
/*
Read next index record. The calling convention of this function is
A READ_RECORD::read_record implementation that reads index sequentially
compatible with READ_RECORD::read_record.
SYNOPSIS
SYNOPSIS
rr_index()
rr_index()
info Scan info
info Scan info
DESCRIPTION
Read the next index record (in forward direction) and translate return
value.
RETURN
RETURN
0 Ok
0 Ok
-1 End of records
-1 End of 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