Query time 0.00159
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "47.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": 53,
"rows_produced_per_join": 53,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (2088,2103,2093,1770,2098,1929,2121,2122,2090,2087,1843,2092,2091,1845,2089,2012,1988,1769,1971,2026))",
"cost_info": {
"read_cost": "23.56",
"eval_cost": "5.30",
"prefix_cost": "28.86",
"data_read_per_join": "848"
},
"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": 2,
"filtered": "5.00",
"cost_info": {
"read_cost": "13.25",
"eval_cost": "0.27",
"prefix_cost": "47.41",
"data_read_per_join": "8K"
},
"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 |
| 1769 |
371,250,394M |
| 1770 |
371,250,394M |
| 1843 |
371,250,394M |
| 1845 |
371,250,394M |
| 1929 |
371,250,394M |
| 1971 |
371,250,393M |
| 1988 |
371,250,393M |
| 2012 |
371,250,393M |
| 2026 |
371,250,393M |
| 2087 |
371,250,393M |
| 2088 |
371,250,397M |
| 2089 |
371,250,397M |
| 2090 |
371,250,398M |
| 2091 |
371,250,398M |
| 2092 |
371,398,250M |
| 2093 |
371,250,398,395M |
| 2098 |
371,250,397,395M |
| 2103 |
371,250,393,395M |
| 2121 |
371,250,394,395M |
| 2122 |
371,394,250,395M |