Query time 0.00153
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "54.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": 60,
"rows_produced_per_join": 60,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (3682,3767,3950,3644,3659,3766,3864,3940,3436,3739,3444,3785,3442,3787,3945,3438,3770,3865,3793,3447,3450,3772,3795,3788))",
"cost_info": {
"read_cost": "27.01",
"eval_cost": "6.00",
"prefix_cost": "33.01",
"data_read_per_join": "960"
},
"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.00",
"eval_cost": "0.30",
"prefix_cost": "54.01",
"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 |
| 3436 |
423,424,166,451M |
| 3438 |
423,166,424,451M |
| 3442 |
423,166,448M |
| 3444 |
166,423,448M |
| 3447 |
166,423,448M |
| 3450 |
166,423,448M |
| 3644 |
166,423,449M |
| 3659 |
166,423,448M |
| 3682 |
424,166,423,450M |
| 3739 |
166,423,448M |
| 3766 |
423,166,448M |
| 3767 |
423,166,448M |
| 3770 |
166,423,448M |
| 3772 |
423,166,448M |
| 3785 |
423,166,448M |
| 3787 |
166,423,448M |
| 3788 |
166,423,448M |
| 3793 |
423,166,448M |
| 3795 |
423,166,448M |
| 3864 |
166,423,449M |
| 3865 |
166,423,449M |
| 3940 |
166,423,449M |
| 3945 |
423,492,424,452,166M |
| 3950 |
448,166,423,449M |