Skip to content
  • Steinar H. Gunderson's avatar
    6864a310
    Bug #28094147: PREPARATORY CHANGES FOR WL #12074 [do examined_rows in iterators, noclose] · 6864a310
    Steinar H. Gunderson authored
    Make counting examined_rows the responsibility of the relevant iterators,
    instead of the join machinery (as the old join machinery will not be used in
    the iterator executor).
    
    An alternative would be counting number of rows that come out and number of rows
    that are somehow filtered away at various stages, but it rapidly becomes very
    complicated and fiddly to get right.
    
    This also fixes an issue where temporary tables that were sorted got some rows
    counted three times in examined_rows instead of twice as they should be (once
    for read from the temporary table, once for read from the sort buffer).
    
    Filesort optimizer trace now no longer returns the number of unfiltered records,
    since WL #12074 is going to pull filtering out of filesort altogether. Instead,
    "num_found_rows" reports consistently the number of rows processed by filesort,
    whether we are using priority queue or not. If there's no condition to filter on,
    this will be exactly the same as "num_examined_rows" used to print.
    
    Change-Id: Ief1168f640313b08e3b0c115ad19cf9525f77b6c
    6864a310
    Bug #28094147: PREPARATORY CHANGES FOR WL #12074 [do examined_rows in iterators, noclose]
    Steinar H. Gunderson authored
    Make counting examined_rows the responsibility of the relevant iterators,
    instead of the join machinery (as the old join machinery will not be used in
    the iterator executor).
    
    An alternative would be counting number of rows that come out and number of rows
    that are somehow filtered away at various stages, but it rapidly becomes very
    complicated and fiddly to get right.
    
    This also fixes an issue where temporary tables that were sorted got some rows
    counted three times in examined_rows instead of twice as they should be (once
    for read from the temporary table, once for read from the sort buffer).
    
    Filesort optimizer trace now no longer returns the number of unfiltered records,
    since WL #12074 is going to pull filtering out of filesort altogether. Instead,
    "num_found_rows" reports consistently the number of rows processed by filesort,
    whether we are using priority queue or not. If there's no condition to filter on,
    this will be exactly the same as "num_examined_rows" used to print.
    
    Change-Id: Ief1168f640313b08e3b0c115ad19cf9525f77b6c
Loading