Query time 0.00122
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "26.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": 25,
"rows_produced_per_join": 25,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (8279,8285,8287,8330,8333,8374,8389,8405,8430,8458,8465,8516,8518,8537,8571,8582,8584,8588,8599,8726,8728,8755,8756,8803))",
"cost_info": {
"read_cost": "14.76",
"eval_cost": "2.50",
"prefix_cost": "17.26",
"data_read_per_join": "400"
},
"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": 1,
"filtered": "5.00",
"cost_info": {
"read_cost": "6.25",
"eval_cost": "0.13",
"prefix_cost": "26.01",
"data_read_per_join": "3K"
},
"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 |
| 8279 |
423M |
| 8285 |
450M |
| 8287 |
424,450M |
| 8330 |
423,450M |
| 8333 |
449M |
| 8374 |
166,426M |
| 8389 |
449M |
| 8405 |
448M |
| 8430 |
449M |
| 8458 |
457M |
| 8465 |
344M |
| 8516 |
449M |
| 8518 |
449M |
| 8537 |
449M |
| 8571 |
424,450M |
| 8582 |
658M |
| 8584 |
448M |
| 8588 |
448M |
| 8599 |
658M |
| 8726 |
426M |
| 8728 |
492M |
| 8755 |
449M |
| 8756 |
347M |
| 8803 |
492M |