Query time 0.00052
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 (11153,11154,11155,11156,11157,11158,11159,11160,11161,11162,11163,11164,11165,11166,11167,11168,11169,11170,11171,11172))",
"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 |
| 11153 |
306M |
| 11154 |
306M |
| 11155 |
306M |
| 11156 |
306M |
| 11157 |
306M |
| 11158 |
306M |
| 11159 |
306M |
| 11160 |
306M |
| 11161 |
306M |
| 11162 |
306M |
| 11163 |
306M |
| 11164 |
306M |
| 11165 |
306M |
| 11166 |
306M |
| 11167 |
306M |
| 11168 |
306M |
| 11169 |
306M |
| 11170 |
306M |
| 11171 |
306M |
| 11172 |
306M |