Query time 0.00173
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "48.21"
},
"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": 54,
"rows_produced_per_join": 54,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (2321,2734,2386,2392,2648,2727,2807,3107,2612,3077,3139,2926,3128,2543,2557,3074,3035,3043,3122,2429))",
"cost_info": {
"read_cost": "23.91",
"eval_cost": "5.40",
"prefix_cost": "29.31",
"data_read_per_join": "864"
},
"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": "13.50",
"eval_cost": "0.27",
"prefix_cost": "48.21",
"data_read_per_join": "8K"
},
"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 |
| 2321 |
166,378,379M |
| 2386 |
166,378,379M |
| 2392 |
166,378,379M |
| 2429 |
450,424,423,166M |
| 2543 |
423,426,166M |
| 2557 |
329,166,347M |
| 2612 |
452,424,423,492,166M |
| 2648 |
424,423,166M |
| 2727 |
423,424,450,166M |
| 2734 |
329,166,457M |
| 2807 |
426,423,166M |
| 2926 |
423,424,451,166M |
| 3035 |
423,424,451,166M |
| 3043 |
423,424,451,166M |
| 3074 |
423,166,446M |
| 3077 |
451,424,423,166M |
| 3107 |
329,166,347M |
| 3122 |
329,166,347M |
| 3128 |
423,424,451,166M |
| 3139 |
329,166,457M |