1

I recently moved to mariadb 10.5, and have encountered this specific output where a percentage is shown along with rows in explain output. I couldn't find any documentation for the same, probably it's a new feature.

What exactly does that mean? Is it the probability of some kind regarding rows being read?

MariaDB [c6b2c772b91fd3d8]> explain 
    select 
        `execute_action`, `state_type` 
    from 
        `tabSuperflow Document State` 
    where 
        `parent` = 'Check Point' 
        and `state` = 'Pending TSM Approval - Delivery' 
    order by 
        modified desc \G
*************************** 1. row ***************************
           id: 1
  select_type: SIMPLE
        table: tabSuperflow Document State
         type: ref|filter
possible_keys: parent,index_on_state
          key: index_on_state|parent
      key_len: 563|563
          ref: const
         rows: 1 (17%)
        Extra: Using index condition; Using where; Using filesort; Using rowid filter
1 row in set (0.001 sec)
4

1 回答 1

0

Found out the answer in a rather unrelated documentation

https://mariadb.com/kb/en/rowid-filtering-optimization/

rows column shows the expected filter selectivity, it is 5%.

So basically that percentage shows expected filter selectivity, i.e. rows which will be filtered using where clause in this step. This output can also be seen in explain extended output in the filtered column.

MariaDB [c6b2c772b91fd3d8]> explain extended select `execute_action`, `state_type` from `tabSuperflow Document State` where `parent` = 'Check Point' and `state` = 'Pending TSM Approval - Delivery' order by modified desc \G
*************************** 1. row ***************************
           id: 1
  select_type: SIMPLE
        table: tabSuperflow Document State
         type: ref|filter
possible_keys: parent,index_on_state
          key: index_on_state|parent
      key_len: 563|563
          ref: const
         rows: 1 (17%)
     filtered: 16.67
        Extra: Using index condition; Using where; Using filesort; Using rowid filter
1 row in set, 1 warning (0.001 sec)

于 2020-07-17T11:35:49.437 回答