• Varun Gupta's avatar
    MDEV-16374: Filtered shows 0 for materilization scan for a semi join, which... · cd33280b
    Varun Gupta authored
    MDEV-16374: Filtered shows 0 for materilization scan for a semi join, which makes optimizer always picks
    materialization scan over materialization lookup
    
    For non-mergeable semi-joins we don't store the estimates of the IN subquery in table->file->stats.records.
    In the function TABLE_LIST::fetch_number_of_rows, we store the number of rows in the tables
    (estimates in case of derived table/views).
    Currently we don't store the estimates for non-mergeable semi-joins, which leads to a problem of selecting
    materialization scan over materialization lookup.
    Fixed this by storing these estimated appropriately
    cd33280b
table.cc 213 KB