Query time 0.00119
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "38.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": 41,
"rows_produced_per_join": 41,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (5602,5863,6116,6299,6384,6464,6483,6938,7059,7168,10032,10978,11139,11145,5496,5810,6253,6307,6345,6378,6609,6619,6828,7260))",
"cost_info": {
"read_cost": "20.36",
"eval_cost": "4.10",
"prefix_cost": "24.46",
"data_read_per_join": "656"
},
"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": 2,
"filtered": "5.00",
"cost_info": {
"read_cost": "10.25",
"eval_cost": "0.21",
"prefix_cost": "38.81",
"data_read_per_join": "6K"
},
"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 |
| 5496 |
466,372,573M |
| 5602 |
466,372,573M |
| 5810 |
372,384M |
| 5863 |
572,372,582M |
| 6116 |
350,166,308,387,250,383M |
| 6253 |
554,556M |
| 6299 |
521,522,536M |
| 6307 |
521,522,536M |
| 6345 |
572,372,582M |
| 6378 |
166,329,347M |
| 6384 |
372,583M |
| 6464 |
476M |
| 6483 |
578M |
| 6609 |
578M |
| 6619 |
372,587M |
| 6828 |
423M |
| 6938 |
630M |
| 7059 |
628M |
| 7168 |
637M |
| 7260 |
623M |
| 10032 |
462M |
| 10978 |
664M |
| 11139 |
664M |
| 11145 |
664M |