Query time 0.00030
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "0.58"
},
"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": "user_id_idx",
"used_key_parts": [
"user_id"
],
"key_length": "4",
"ref": [
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "67.15",
"cost_info": {
"read_cost": "0.25",
"eval_cost": "0.07",
"prefix_cost": "0.35",
"data_read_per_join": "1K"
},
"used_columns": [
"video_id",
"status",
"user_id"
],
"attached_condition": "(`cscart_db`.`cv`.`status` = 'A')"
}
},
{
"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": 0,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.17",
"eval_cost": "0.07",
"prefix_cost": "0.59",
"data_read_per_join": "2K"
},
"used_columns": [
"video_id",
"lang_code"
]
}
}
]
}
}
Result
| COUNT(DISTINCT cv.video_id) |
| 0 |