Query time 0.00103
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "51.41"
},
"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": 58,
"rows_produced_per_join": 58,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (2698,3090,3605,2310,3155,2737,2559,2822,2431,2924,3136,1626,2862,2922,2336,3603,2693,3928,2333,2809))",
"cost_info": {
"read_cost": "25.31",
"eval_cost": "5.80",
"prefix_cost": "31.11",
"data_read_per_join": "928"
},
"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": "14.50",
"eval_cost": "0.29",
"prefix_cost": "51.41",
"data_read_per_join": "9K"
},
"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 |
| 1626 |
166,492M |
| 2310 |
166,378,379M |
| 2333 |
166,378,379M |
| 2336 |
166,378,379M |
| 2431 |
423,424,450,166M |
| 2559 |
329,166,344M |
| 2693 |
423,424,166M |
| 2698 |
450,424,423,166M |
| 2737 |
423,424,451,166M |
| 2809 |
329,166,347M |
| 2822 |
329,166,344M |
| 2862 |
423,425,166M |
| 2922 |
423,424,450,166M |
| 2924 |
423,424,451,166M |
| 3090 |
329,166,344M |
| 3136 |
329,166,457M |
| 3155 |
423,424,451,166M |
| 3603 |
451,424,423,166M |
| 3605 |
424,423,166,451M |
| 3928 |
423,448,166M |