Query time 0.00190
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "93.41"
},
"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": 76,
"rows_produced_per_join": 76,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (2698,2340,3834,3306,5848,2352,2431,5114,2922,5798,5801,5829,3301,5852,5928,5847,2341,5794,2702,3147,3520,3529,3146,3809))",
"cost_info": {
"read_cost": "32.61",
"eval_cost": "7.60",
"prefix_cost": "40.21",
"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": 76,
"filtered": "100.00",
"cost_info": {
"read_cost": "19.00",
"eval_cost": "7.60",
"prefix_cost": "66.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": "19.00",
"eval_cost": "0.38",
"prefix_cost": "93.41",
"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 |
| 2340 |
424,423,450,166M |
0 |
| 2341 |
424,423,450,166M |
0 |
| 2352 |
424,423,450,166M |
0 |
| 2431 |
423,424,450,166M |
0 |
| 2698 |
450,424,423,166M |
0 |
| 2702 |
423,424,450,166M |
0 |
| 2922 |
423,424,450,166M |
0 |
| 3146 |
423,424,450,166M |
0 |
| 3147 |
423,424,450,166M |
0 |
| 3301 |
423,424,450,166M |
0 |
| 3306 |
450,424,423,166M |
0 |
| 3520 |
423,424,450,166M |
0 |
| 3529 |
423,424,450,166M |
0 |
| 3809 |
423,424,450,166M |
0 |
| 3834 |
423,424,450,166M |
0 |
| 5114 |
450,423,424,166M |
0 |
| 5794 |
450,424,423,166M |
0 |
| 5798 |
423,450,424,166M |
0 |
| 5801 |
423,424,450,166M |
0 |
| 5829 |
423,424,450,166M |
0 |
| 5847 |
423,424,450,166M |
0 |
| 5848 |
423,424,450,166M |
0 |
| 5852 |
423,424,450,166M |
0 |
| 5928 |
423,424,450,166M |
0 |