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
de3019c6
Commit
de3019c6
authored
Sep 16, 2003
by
kostja@oak.local
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comment made more explanatory
parent
29eec6c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
sql/sql_select.cc
sql/sql_select.cc
+7
-5
No files found.
sql/sql_select.cc
View file @
de3019c6
...
...
@@ -2149,11 +2149,13 @@ find_best(JOIN *join,table_map rest_tables,uint idx,double record_count,
}
/*
In case of full scan we check every row in the table:
here we take into account rows read and skipped, as well as rows
passed to next select
*/
We estimate the cost of making full cortesian product between
rows in the scanned table and generated records as
record_count*s->records/TIME_FOR_COMPARE. Taking into account
cost of evaluating WHERE clause for s->found_records is not
necessary because it costs much less than the cost mentioned
above.
*/
if
(
best
==
DBL_MAX
||
(
tmp
+
record_count
/
(
double
)
TIME_FOR_COMPARE
*
s
->
records
<
best
+
record_count
/
(
double
)
TIME_FOR_COMPARE
*
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