Query time 0.00104
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "209.35"
},
"nested_loop": [
{
"table": {
"table_name": "cv",
"access_type": "ref",
"possible_keys": [
"status_idx",
"user_id_idx",
"idx_cp_videos_status_userid_videoid",
"idx_status_timestamp"
],
"key": "idx_cp_videos_status_userid_videoid",
"used_key_parts": [
"status",
"user_id"
],
"key_length": "7",
"ref": [
"const",
"const"
],
"rows_examined_per_scan": 457,
"rows_produced_per_join": 457,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "3.70",
"eval_cost": "45.70",
"prefix_cost": "49.40",
"data_read_per_join": "714K"
},
"used_columns": [
"video_id",
"status",
"user_id"
]
}
},
{
"table": {
"table_name": "cvd",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"video_id",
"lang_code"
],
"key_length": "9",
"ref": [
"cscart_db.cv.video_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 457,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "114.25",
"eval_cost": "45.70",
"prefix_cost": "209.35",
"data_read_per_join": "1M"
},
"used_columns": [
"video_id",
"lang_code"
]
}
}
]
}
}
Result
| COUNT(DISTINCT cv.video_id) |
| 457 |