| 11094 | */ |
| 11095 | |
| 11096 | double JOIN::get_examined_rows() |
| 11097 | { |
| 11098 | double examined_rows; |
| 11099 | double prev_fanout= 1; |
| 11100 | double records; |
| 11101 | JOIN_TAB *tab= first_breadth_first_tab(); |
| 11102 | JOIN_TAB *prev_tab= tab; |
| 11103 | |
| 11104 | records= (double)tab->get_examined_rows(); |
| 11105 | |
| 11106 | while ((tab= next_breadth_first_tab(first_breadth_first_tab(), |
| 11107 | top_join_tab_count, tab))) |
| 11108 | { |
| 11109 | prev_fanout= COST_MULT(prev_fanout, prev_tab->records_read); |
| 11110 | records= |
| 11111 | COST_ADD(records, |
| 11112 | COST_MULT((double) (tab->get_examined_rows()), prev_fanout)); |
| 11113 | prev_tab= tab; |
| 11114 | } |
| 11115 | examined_rows= records; |
| 11116 | return examined_rows; |
| 11117 | } |
| 11118 | |
| 11119 | |
| 11120 | /** |
no test coverage detected