Query time 0.00083
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "9.86"
},
"grouping_operation": {
"using_filesort": false,
"nested_loop": [
{
"table": {
"table_name": "prof",
"access_type": "range",
"possible_keys": [
"idx_entire_row",
"idx_field_object",
"idx_obj_objtyp"
],
"key": "idx_field_object",
"used_key_parts": [
"field_id",
"object_id"
],
"key_length": "6",
"rows_examined_per_scan": 14,
"rows_produced_per_join": 14,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "3.56",
"eval_cost": "1.40",
"prefix_cost": "4.96",
"data_read_per_join": "10K"
},
"used_columns": [
"object_id",
"object_type",
"field_id",
"value"
],
"attached_condition": "((`cscart_db`.`prof`.`field_id` = 78) and (`cscart_db`.`prof`.`object_id` in (223511,13475,373783,203705)))"
}
},
{
"table": {
"table_name": "pfd",
"access_type": "ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"object_id",
"object_type"
],
"key_length": "6",
"ref": [
"cscart_db.prof.value",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 14,
"filtered": "100.00",
"index_condition": "<if>(is_not_null_compl(pfd), (cast(`cscart_db`.`pfd`.`object_id` as double) = cast(`cscart_db`.`prof`.`value` as double)), true)",
"cost_info": {
"read_cost": "3.50",
"eval_cost": "1.40",
"prefix_cost": "9.86",
"data_read_per_join": "10K"
},
"used_columns": [
"object_id",
"description",
"object_type"
]
}
}
]
}
}
}
Result
| user_id |
profile_filed |
category_id |
category |
| 13475 |
78 |
139,88,89 |
K Beauty,Makeup,Skincare |
| 203705 |
78 |
139,86,87 |
K Beauty,Nutrition,Hair care |
| 223511 |
78 |
139,88,89 |
K Beauty,Makeup,Skincare |
| 373783 |
78 |
139,86,87,88,89 |
K Beauty,Nutrition,Hair care,Makeup,Skincare |