Query time 0.00142
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "61.21"
},
"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": 48,
"rows_produced_per_join": 48,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (5879,5876,5536,5792,8723,5769,5537,5790,5535,5533,5793,5874,5878,5875,5877,6586,6225,6746,6731,6732,6744,6756,6758,10545))",
"cost_info": {
"read_cost": "22.81",
"eval_cost": "4.80",
"prefix_cost": "27.61",
"data_read_per_join": "768"
},
"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": 48,
"filtered": "100.00",
"cost_info": {
"read_cost": "12.00",
"eval_cost": "4.80",
"prefix_cost": "44.41",
"data_read_per_join": "768"
},
"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": 2,
"filtered": "5.00",
"cost_info": {
"read_cost": "12.00",
"eval_cost": "0.24",
"prefix_cost": "61.21",
"data_read_per_join": "7K"
},
"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 |
| 5533 |
466,372,579M |
0 |
| 5535 |
466,372,579M |
0 |
| 5536 |
466,372,579M |
0 |
| 5537 |
466,372,579M |
0 |
| 5769 |
466,372,579M |
0 |
| 5790 |
466,372,579M |
0 |
| 5792 |
466,372,579M |
0 |
| 5793 |
466,372,579M |
0 |
| 5874 |
466,372,579M |
0 |
| 5875 |
466,372,579M |
0 |
| 5876 |
466,372,579M |
0 |
| 5877 |
466,372,579M |
0 |
| 5878 |
466,372,579M |
0 |
| 5879 |
466,372,579M |
0 |
| 6225 |
579M |
0 |
| 6586 |
579M |
0 |
| 6731 |
466,579M |
0 |
| 6732 |
466,579M |
0 |
| 6744 |
466,579M |
0 |
| 6746 |
466,579M |
0 |
| 6756 |
466,579M |
0 |
| 6758 |
466,579M |
0 |
| 8723 |
579M |
0 |
| 10545 |
579M |
0 |