Query time 0.00187
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "86.66"
},
"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": 71,
"rows_produced_per_join": 71,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (3167,3750,3830,3592,3670,3684,3600,3874,3365,3437,3682,3879,3753,2952,3230,3108,3303,3376,3412,3436))",
"cost_info": {
"read_cost": "29.86",
"eval_cost": "7.10",
"prefix_cost": "36.96",
"data_read_per_join": "1K"
},
"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": 71,
"filtered": "100.00",
"cost_info": {
"read_cost": "17.75",
"eval_cost": "7.10",
"prefix_cost": "61.81",
"data_read_per_join": "1K"
},
"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": "17.75",
"eval_cost": "0.36",
"prefix_cost": "86.66",
"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 |
position |
| 2952 |
452,424,423,166M |
0 |
| 3108 |
452,424,423,166,492M |
0 |
| 3167 |
423,424,452,166M |
0 |
| 3230 |
450,424,423,166M |
0 |
| 3303 |
450,424,423,166M |
0 |
| 3365 |
424,423,452,166M |
0 |
| 3376 |
492,424,423,166M |
0 |
| 3412 |
451,424,423,166M |
0 |
| 3436 |
423,424,166,451M |
0 |
| 3437 |
424,423,166,451M |
0 |
| 3592 |
424,423,452,166M |
0 |
| 3600 |
424,423,166,492M |
0 |
| 3670 |
424,166,423,450M |
0 |
| 3682 |
424,166,423,450M |
0 |
| 3684 |
424,166,423,450M |
0 |
| 3750 |
452,424,423,166,492M |
0 |
| 3753 |
492,452,424,423,166M |
0 |
| 3830 |
452,424,423,166M |
0 |
| 3874 |
423,452,424,166M |
0 |
| 3879 |
452,347,329,424,423,166,492M |
0 |