| id | select_type | table | type | possible_keys | key | key_len | ref | rows | filtered | Extra |
| 1 | PRIMARY | ts | ALL | PRIMARY,lead_id | (NULL) | (NULL) | (NULL) | 191993 | 50.00 | Using where; Using temporary; Using filesort |
| 1 | PRIMARY | l | eq_ref | PRIMARY | PRIMARY | 4 | dms.ts.lead_id | 1 | 100.00 | Using where |
| 1 | PRIMARY | c | ref | potential_id | potential_id | 9 | dms.ts.lead_id | 1 | 100.00 | Using where |
| 1 | PRIMARY | tsm1 | ref | trial_service_id,meta_key,meta_value | trial_service_id | 4 | dms.ts.id | 3 | 100.00 | Using where |
| 1 | PRIMARY | tsm2 | ref | trial_service_id,meta_key | trial_service_id | 4 | dms.ts.id | 3 | 100.00 | Using where |
| 1 | PRIMARY | <derived6> | ref | key0 | key0 | 5 | dms.ts.lead_id | 10 | 100.00 | Using where |
| 6 | DERIVED | fl | index | TableColumnRow | Idx_row_id | 5 | (NULL) | 27841 | 100.00 | Using where |
| 3 | UNION | l | ALL | (NULL) | (NULL) | (NULL) | (NULL) | 1031135 | 100.00 | Using where; Using temporary; Using filesort |
| 3 | UNION | c | ref | potential_id | potential_id | 9 | dms.l.id | 1 | 100.00 | Using where |
| (NULL) | UNION RESULT | <union1,3> | ALL | (NULL) | (NULL) | (NULL) | (NULL) | (NULL) | (NULL) | |