Query time 0.00211
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "59.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": 67,
"rows_produced_per_join": 67,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (5360,3522,4410,11206,2520,4045,4470,10135,10397,6266,3401,4513,2224,2448,3023,4343,5197,5985,5245,2195,6101,4130,4139,4872))",
"cost_info": {
"read_cost": "29.46",
"eval_cost": "6.70",
"prefix_cost": "36.16",
"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": "16.75",
"eval_cost": "0.34",
"prefix_cost": "59.61",
"data_read_per_join": "10K"
},
"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 |
| 2195 |
426,423,166M |
| 2224 |
424,423,451,166M |
| 2448 |
166,170,357M |
| 2520 |
423,426,166M |
| 3023 |
329,166,344M |
| 3401 |
492,424,423,166M |
| 3522 |
423,424,450,166M |
| 4045 |
219,496,498M |
| 4130 |
513,166,514M |
| 4139 |
513,166,517M |
| 4343 |
513,166,517M |
| 4410 |
386,308,250,350,166,382M |
| 4470 |
387,308,250,350,166,383M |
| 4513 |
219,496M |
| 4872 |
166,170,530M |
| 5197 |
557,555,372,250,562,553,552,560M |
| 5245 |
372,551M |
| 5360 |
552,372,550M |
| 5985 |
454,190M |
| 6101 |
166,423,586M |
| 6266 |
473,476M |
| 10135 |
372,454,453,190,174,166M |
| 10397 |
460,384M |
| 11206 |
462M |