diff options
author | sergefp@mysql.com <> | 2006-09-29 15:58:47 +0400 |
---|---|---|
committer | sergefp@mysql.com <> | 2006-09-29 15:58:47 +0400 |
commit | 47b357522a2e9329b2c0376db0199508fe3654d8 (patch) | |
tree | 5ddf809bcc56ad6e7f36bca0a68ae71a0e62064b /sql/sql_select.h | |
parent | 16a5d97a5d335d10f9c96bea00801fcc28c545e9 (diff) | |
download | mariadb-git-47b357522a2e9329b2c0376db0199508fe3654d8.tar.gz |
BUG#14940: Slow join order is chosen: [2nd commit with post-review fixes]
- Re-worked the prev_record_reads() function to return the lower bound of
number of different table access scans that will be performed.
Diffstat (limited to 'sql/sql_select.h')
-rw-r--r-- | sql/sql_select.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sql/sql_select.h b/sql/sql_select.h index 3b0c312757d..eb6d2d5d34f 100644 --- a/sql/sql_select.h +++ b/sql/sql_select.h @@ -176,7 +176,13 @@ enum_nested_loop_state sub_select(JOIN *join,JOIN_TAB *join_tab, bool */ typedef struct st_position { + /* + The "fanout": number of output rows that will be produced (after + pushed down selection condition is applied) per each row combination of + previous tables. + */ double records_read; + /* Cost accessing the table in course of the entire complete join execution, i.e. cost of one access method use (e.g. 'range' or 'ref' scan ) times @@ -184,7 +190,15 @@ typedef struct st_position */ double read_time; JOIN_TAB *table; + + /* + NULL - 'index' or 'range' or 'index_merge' or 'ALL' access is used. + Other - [eq_]ref[_or_null] access is used. Pointer to {t.keypart1 = expr} + */ KEYUSE *key; + + /* If ref-based access is used: bitmap of tables this table depends on */ + table_map ref_depend_map; } POSITION; |