Query time 0.00161
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "77.31"
},
"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": 62,
"rows_produced_per_join": 62,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (3424,3427,3598,3269,3284,3268,3302,3601,3286,3304,3264,3426,3431,3296,3266,2149,3425,3265,3263,4793,4784,4785,3305,3280))",
"cost_info": {
"read_cost": "27.71",
"eval_cost": "6.20",
"prefix_cost": "33.91",
"data_read_per_join": "992"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
]
}
},
{
"table": {
"table_name": "product_position_source",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"pt"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id",
"product_id"
],
"key_length": "6",
"ref": [
"const",
"softwarepirmam_hewadelivard_cscart_4.cscart_products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 62,
"filtered": "100.00",
"cost_info": {
"read_cost": "15.50",
"eval_cost": "6.20",
"prefix_cost": "55.61",
"data_read_per_join": "992"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
},
{
"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.50",
"eval_cost": "0.31",
"prefix_cost": "77.31",
"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 |
position |
| 2149 |
332,245,418M |
0 |
| 3263 |
332,245,416M |
0 |
| 3264 |
245,332,416M |
0 |
| 3265 |
332,245,416M |
0 |
| 3266 |
245,333,419M |
0 |
| 3268 |
245,334,421M |
0 |
| 3269 |
245,334,421M |
0 |
| 3280 |
329,166,417,332,245,399,524M |
0 |
| 3284 |
245,332,418M |
0 |
| 3286 |
332,245,418M |
0 |
| 3296 |
332,245,418M |
0 |
| 3302 |
332,245,418M |
0 |
| 3304 |
245,332,418M |
0 |
| 3305 |
245,333,420M |
0 |
| 3424 |
332,245,416M |
0 |
| 3425 |
333,245,420M |
0 |
| 3426 |
332,333,245,480,417M |
0 |
| 3427 |
333,245,419M |
0 |
| 3431 |
245,332,416M |
0 |
| 3598 |
245,334,421M |
0 |
| 3601 |
245,332,417M |
0 |
| 4784 |
245,334,422M |
0 |
| 4785 |
245,334,422M |
0 |
| 4793 |
245,334,422M |
0 |