Query time 0.00180
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "63.11"
},
"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": 72,
"rows_produced_per_join": 72,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (2227,2226,2655,2719,2728,3150,3151,3213,3214,3216,3215,3289,3382,3383,3385,3386,3552,3553,3664,3665,3832,3831))",
"cost_info": {
"read_cost": "30.71",
"eval_cost": "7.20",
"prefix_cost": "37.91",
"data_read_per_join": "1K"
},
"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": "18.00",
"eval_cost": "0.36",
"prefix_cost": "63.11",
"data_read_per_join": "11K"
},
"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 |
| 2226 |
424,423,450,166M |
| 2227 |
423,424,450,166M |
| 2655 |
423,424,450,166M |
| 2719 |
423,424,450,166M |
| 2728 |
423,424,450,166M |
| 3150 |
423,424,450,166M |
| 3151 |
423,424,450,166M |
| 3213 |
450,423,424,166M |
| 3214 |
450,424,423,166M |
| 3215 |
450,424,423,166M |
| 3216 |
450,423,424,166M |
| 3289 |
450,424,423,166M |
| 3382 |
423,424,450,166M |
| 3383 |
423,424,450,166M |
| 3385 |
423,424,450,166M |
| 3386 |
423,424,450,166M |
| 3552 |
423,424,450,166M |
| 3553 |
423,424,450,166M |
| 3664 |
423,424,450,166M |
| 3665 |
423,424,450,166M |
| 3831 |
423,424,450,166M |
| 3832 |
424,450,423,166M |