By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
version() |
---|
10.6.8-MariaDB |
count(*) |
---|
4 |
count(*) |
---|
12 |
id | select_type | table | type | possible_keys | key | key_len | ref | rows | r_rows | filtered | r_filtered | Extra |
---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | SIMPLE | TABLE1 | ALL | null | null | null | null | 4 | 4.00 | 100.00 | 100.00 | |
1 | SIMPLE | TABLE2 | ALL | PRIMARY | null | null | null | 12 | 12.00 | 100.00 | 25.00 | Range checked for each record (index map: 0x1) |
ANALYZE |
---|
{ "query_block": { "select_id": 1, "r_loops": 1, "r_total_time_ms": 0.09102488, "const_condition": "1", "table": { "table_name": "TABLE1", "access_type": "ALL", "r_loops": 1, "rows": 4, "r_rows": 4, "r_table_time_ms": 0.008640574, "r_other_time_ms": 0.018125948, "filtered": 100, "r_filtered": 100 }, "range-checked-for-each-record": { "keys": ["PRIMARY"], "r_keys": { "full_scan": 4, "index_merge": 0, "range": { "PRIMARY": 0 } }, "table": { "table_name": "TABLE2", "access_type": "ALL", "possible_keys": ["PRIMARY"], "r_loops": 4, "rows": 12, "r_rows": 12, "r_table_time_ms": 0.045866316, "r_other_time_ms": 0.013991977, "filtered": 100, "r_filtered": 25 } } } } |
id | select_type | table | type | possible_keys | key | key_len | ref | rows | r_rows | filtered | r_filtered | Extra |
---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | SIMPLE | TABLE1 | ALL | null | null | null | null | 4 | 4.00 | 100.00 | 100.00 | |
1 | SIMPLE | TABLE2 | eq_ref | PRIMARY | PRIMARY | 4 | func | 1 | 1.00 | 100.00 | 100.00 | Using where |
ANALYZE |
---|
{ "query_block": { "select_id": 1, "r_loops": 1, "r_total_time_ms": 0.057156332, "const_condition": "1", "table": { "table_name": "TABLE1", "access_type": "ALL", "r_loops": 1, "rows": 4, "r_rows": 4, "r_table_time_ms": 0.01127351, "r_other_time_ms": 0.008406991, "filtered": 100, "r_filtered": 100 }, "table": { "table_name": "TABLE2", "access_type": "eq_ref", "possible_keys": ["PRIMARY"], "key": "PRIMARY", "key_length": "4", "used_key_parts": ["Id"], "ref": ["func"], "r_loops": 4, "rows": 1, "r_rows": 1, "r_table_time_ms": 0.027864912, "r_other_time_ms": 0.005289382, "filtered": 100, "r_filtered": 100, "attached_condition": "trigcond(TABLE2.`Id` = TABLE1.`Id` * 10000 + 1)" } } } |