By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
| id | name | cnt |
|---|---|---|
| 1 | Иван | 3 |
| 2 | Петр | 1 |
| 3 | Сидор | 0 |
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
|---|---|---|---|---|---|---|---|---|---|
| 1 | PRIMARY | p | ALL | null | null | null | null | 3 | |
| 2 | DEPENDENT SUBQUERY | f | ref | i1 | i1 | 5 | db_1842861616.p.id | 1 | Using index |
| id | name | cnt |
|---|---|---|
| 1 | Иван | 3 |
| 2 | Петр | 1 |
| 3 | Сидор | 0 |
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
|---|---|---|---|---|---|---|---|---|---|
| 1 | SIMPLE | p | index | null | PRIMARY | 4 | null | 3 | |
| 1 | SIMPLE | f | ref | i1 | i1 | 5 | db_1842861616.p.id | 1 | Using index |