Query time 0.00158
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "55.61"
},
"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": 62,
"rows_produced_per_join": 62,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (3826,3660,3649,3733,3740,3743,3944,3741,3441,3811,3653,3946,3768,3734,3821,3747,3641,3952,3738,3435,3798,3443,3730,3737))",
"cost_info": {
"read_cost": "27.71",
"eval_cost": "6.20",
"prefix_cost": "33.91",
"data_read_per_join": "992"
},
"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": "15.50",
"eval_cost": "0.31",
"prefix_cost": "55.61",
"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 |
| 3435 |
423,424,451,166M |
| 3441 |
166,423,448M |
| 3443 |
166,423,448M |
| 3641 |
423,166,449M |
| 3649 |
423,492,166M |
| 3653 |
378,166,506M |
| 3660 |
166,423,448M |
| 3730 |
423,449,166M |
| 3733 |
423,166,449M |
| 3734 |
423,166,449M |
| 3737 |
423,166,448M |
| 3738 |
423,166,448M |
| 3740 |
166,423,448M |
| 3741 |
423,166,448M |
| 3743 |
423,166,448M |
| 3747 |
423,166,448M |
| 3768 |
448,423,166M |
| 3798 |
166,423,449M |
| 3811 |
423,449,166M |
| 3821 |
250,166,351,401,446M |
| 3826 |
250,166,401,351,446M |
| 3944 |
425,423,166M |
| 3946 |
424,166,492,423M |
| 3952 |
166,423,492M |