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
1777d4db
Commit
1777d4db
authored
Aug 15, 2000
by
sasha@mysql.sashanet.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge work:/home/bk/mysql
into mysql.sashanet.com:/home/sasha/src/bk/mysql
parents
ac9de478
c442a5dd
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
55 deletions
+52
-55
Docs/internals.texi
Docs/internals.texi
+11
-13
Docs/manual.texi
Docs/manual.texi
+41
-42
No files found.
Docs/internals.texi
View file @
1777d4db
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
@c @synindex tp fn cp
@c @synindex tp fn cp
@synindex cp fn
@synindex cp fn
@iftex
@iftex
@c Well this is normal in Europe. Maybe this shold go into the include.texi?
@c Well this is normal in Europe. Maybe this sho
u
ld go into the include.texi?
@afourpaper
@afourpaper
@end iftex
@end iftex
@c Get version and other info
@c Get version and other info
...
@@ -47,10 +47,10 @@ This is a manual about @strong{MySQL} internals.
...
@@ -47,10 +47,10 @@ This is a manual about @strong{MySQL} internals.
@end menu
@end menu
@node caching
@node caching
@chapter How
do MySQL handle
caching
@chapter How
MySQL handles
caching
MySQL has the following caches:
MySQL has the following caches:
(Note that the some of the filename ha
s wrong spelling of cache
:)
(Note that the some of the filename ha
ve a wrong spelling of cache.
:)
@itemize @bullet
@itemize @bullet
@item Key cache
@item Key cache
...
@@ -76,17 +76,17 @@ cached for each user/database combination. sql/sql_acl.cc
...
@@ -76,17 +76,17 @@ cached for each user/database combination. sql/sql_acl.cc
@item Heap table cache
@item Heap table cache
Many use of GROUP BY or DISTINCT caches all found
Many use of GROUP BY or DISTINCT caches all found
rows in a HEAP table (this is a very quick
, in
memory table with hash index)
rows in a HEAP table (this is a very quick
in-
memory table with hash index)
@item Join row cache.
@item Join row cache.
For every full join in a SELECT statement (a full join here means there
For every full join in a SELECT statement (a full join here means there
w
as
no keys that one could use to find the next table in a list), the
w
ere
no keys that one could use to find the next table in a list), the
found rows are cached in a join cache. One SELECT query can use many
found rows are cached in a join cache. One SELECT query can use many
join caches in the worst case.
join caches in the worst case.
@end itemize
@end itemize
@node flush tables
@node flush tables
@chapter How
do MySQL handle
flush tables
@chapter How
MySQL handles
flush tables
@itemize @bullet
@itemize @bullet
@item
@item
...
@@ -122,23 +122,23 @@ same tables.
...
@@ -122,23 +122,23 @@ same tables.
@end itemize
@end itemize
@node Filesort
@node Filesort
@chapter How
do MySQL do
sorting (filesort)
@chapter How
MySQL does
sorting (filesort)
- Read all rows according to key or by table-scanning.
- Read all rows according to key or by table-scanning.
- Store the sort-key in a buffer (sort
_
buffer).
- Store the sort-key in a buffer (sort
_
buffer).
- When the buffer gets full, run a qsort on it and store the result
- When the buffer gets full, run a qsort on it and store the result
in a temporary file. Save a pointer to the sorted block.
in a temporary file. Save a pointer to the sorted block.
- Repeat
e the above until all rows has
been read.
- Repeat
the above until all rows have
been read.
- Repeat the following until there is less than MERGEBUFF2 (15) blocks left.
- Repeat the following until there is less than MERGEBUFF2 (15) blocks left.
- Do a multi-merge of up to MERGEBUFF (7) regions to one block in
- Do a multi-merge of up to MERGEBUFF (7) regions to one block in
another temporary file. Repeat until all blocks from the first file
another temporary file. Repeat until all blocks from the first file
is
in the second file.
are
in the second file.
- On the last multi-merge, only the pointer to the row (last part of
- On the last multi-merge, only the pointer to the row (last part of
the sort-key) is written to a result file.
the sort-key) is written to a result file.
- Now the code in sql/records.cc will be used to read through the
- Now the code in sql/records.cc will be used to read through the
m
in sorted order by using the row pointersin the result file.
in sorted order by using the row pointers
in the result file.
To optimize this, we read in a big block of row pointers, sort these
To optimize this, we read in a big block of row pointers, sort these
and then we read the rows in the sorted order into a row buffer
and then we read the rows in the sorted order into a row buffer
(record
_
buffer) .
(record
_
buffer) .
...
@@ -152,5 +152,3 @@ same tables.
...
@@ -152,5 +152,3 @@ same tables.
@contents
@contents
@bye
@bye
Do text here do something ??
Docs/manual.texi
View file @
1777d4db
This diff is collapsed.
Click to expand it.
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