Query time 0.00142
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "30.81"
},
"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": 31,
"rows_produced_per_join": 31,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (10427,10470,10359,10361,10376,10390,10426,10429,10451,10537,10540,10360,10367,10374,10377,10382,10386,10389,10409,10421,10423,10456,10465,10469))",
"cost_info": {
"read_cost": "16.86",
"eval_cost": "3.10",
"prefix_cost": "19.96",
"data_read_per_join": "496"
},
"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": 1,
"filtered": "5.00",
"cost_info": {
"read_cost": "7.75",
"eval_cost": "0.16",
"prefix_cost": "30.81",
"data_read_per_join": "4K"
},
"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 |
| 10359 |
466M |
| 10360 |
573M |
| 10361 |
573M |
| 10367 |
372M |
| 10374 |
556M |
| 10376 |
574M |
| 10377 |
556M |
| 10382 |
575M |
| 10386 |
372,587M |
| 10389 |
372,587M |
| 10390 |
587M |
| 10409 |
575M |
| 10421 |
574M |
| 10423 |
574M |
| 10426 |
466,574M |
| 10427 |
466,574M |
| 10429 |
578,372M |
| 10451 |
566,597M |
| 10456 |
597,566M |
| 10465 |
566,597M |
| 10469 |
572M |
| 10470 |
466M |
| 10537 |
467M |
| 10540 |
372M |