Query time 0.00077
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "23.91"
},
"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": 23,
"rows_produced_per_join": 23,
"filtered": "100.00",
"index_condition": "(`gaseus`.`cscart_products_categories`.`product_id` in (3297,3298,3299,3304,3308,3309,3310,3314,3318,6845,6849,6852,6853,6856,6857,6858,6862,6863,6865,7057,7058,7059))",
"cost_info": {
"read_cost": "13.56",
"eval_cost": "2.30",
"prefix_cost": "15.86",
"data_read_per_join": "368"
},
"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": [
"gaseus.cscart_products_categories.category_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "5.00",
"cost_info": {
"read_cost": "5.75",
"eval_cost": "0.12",
"prefix_cost": "23.91",
"data_read_per_join": "4K"
},
"used_columns": [
"category_id",
"storefront_id",
"usergroup_ids",
"status"
],
"attached_condition": "((`gaseus`.`cscart_categories`.`storefront_id` in (0,1)) and ((`gaseus`.`cscart_categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`gaseus`.`cscart_categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`gaseus`.`cscart_categories`.`usergroup_ids`))) and (`gaseus`.`cscart_categories`.`status` in ('A','H')))"
}
}
]
}
}
}
Result
| product_id |
category_ids |
| 3297 |
272M |
| 3298 |
272M |
| 3299 |
272M |
| 3304 |
272M |
| 3308 |
272M |
| 3309 |
272M |
| 3310 |
272M |
| 3314 |
272M |
| 3318 |
272M |
| 6845 |
272M |
| 6849 |
272M |
| 6852 |
272M |
| 6853 |
272M |
| 6856 |
272M |
| 6857 |
272M |
| 6858 |
272M |
| 6862 |
272M |
| 6863 |
272M |
| 6865 |
272M |
| 7057 |
272M |
| 7058 |
272M |
| 7059 |
272M |