Query time 0.00190
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "62.01"
},
"grouping_operation": {
"using_filesort": false,
"nested_loop": [
{
"table": {
"table_name": "cscart_products_categories",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"pt"
],
"key": "pt",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"rows_examined_per_scan": 70,
"rows_produced_per_join": 70,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (3397,3363,3389,3390,3400,3416,3361,3385,3382,3348,3380,3368,3414,3387,3388,3406,3384,3379,3381,3407,3364,3415,3409,3411))",
"cost_info": {
"read_cost": "30.51",
"eval_cost": "7.00",
"prefix_cost": "37.51",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
]
}
},
{
"table": {
"table_name": "cscart_categories",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"c_status",
"p_category_id"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"ref": [
"softwarepirmam_hewadelivard_cscart_4.cscart_products_categories.category_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 3,
"filtered": "5.00",
"cost_info": {
"read_cost": "17.50",
"eval_cost": "0.35",
"prefix_cost": "62.01",
"data_read_per_join": "10K"
},
"used_columns": [
"category_id",
"storefront_id",
"usergroup_ids",
"status"
],
"attached_condition": "((`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`storefront_id` in (0,1)) and ((`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`usergroup_ids`))) and (`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`status` in ('A','H')))"
}
}
]
}
}
}
Result
| product_id |
category_ids |
| 3348 |
166,378,483M |
| 3361 |
166,378,483M |
| 3363 |
166,378,483M |
| 3364 |
452,424,423,166,492M |
| 3368 |
424,423,166,451M |
| 3379 |
424,423,166,451M |
| 3380 |
423,424,166M |
| 3381 |
423,424,166M |
| 3382 |
423,424,450,166M |
| 3384 |
423,424,450,166M |
| 3385 |
423,424,450,166M |
| 3387 |
423,424,450,166M |
| 3388 |
423,424,450,166M |
| 3389 |
423,424,166M |
| 3390 |
423,424,166M |
| 3397 |
448,423,166M |
| 3400 |
448,423,166M |
| 3406 |
423,448,166M |
| 3407 |
423,424,451,166M |
| 3409 |
423,424,451,166M |
| 3411 |
423,424,451,166M |
| 3414 |
423,424,451,166M |
| 3415 |
423,424,451,166M |
| 3416 |
424,423,166M |