Query time 0.00092
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "23.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": 23,
"rows_produced_per_join": 23,
"filtered": "100.00",
"index_condition": "(`gaseus`.`cscart_products_categories`.`product_id` in (11047,11048,11049,11050,11051,11052,11053,11054,11055,11056,11057,11058,11059,11060,11061,11062,11063,11064,11065,11066))",
"cost_info": {
"read_cost": "13.06",
"eval_cost": "2.30",
"prefix_cost": "15.36",
"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.41",
"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 |
| 11047 |
306M |
| 11048 |
306M |
| 11049 |
306M |
| 11050 |
306M |
| 11051 |
306M |
| 11052 |
306M |
| 11053 |
306M |
| 11054 |
306M |
| 11055 |
306M |
| 11056 |
306M |
| 11057 |
306M |
| 11058 |
306M |
| 11059 |
306M |
| 11060 |
306M |
| 11061 |
306M |
| 11062 |
306M |
| 11063 |
306M |
| 11064 |
306M |
| 11065 |
306M |
| 11066 |
306M |