Query time 0.00080
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "22.61"
},
"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": 22,
"rows_produced_per_join": 22,
"filtered": "100.00",
"index_condition": "(`gaseus`.`cscart_products_categories`.`product_id` in (10965,10966,10967,10968,10969,10970,10971,10972,10973,10974,10975,10976,10977,10978,10979,10980,10981,10982,10983,10984))",
"cost_info": {
"read_cost": "12.71",
"eval_cost": "2.20",
"prefix_cost": "14.91",
"data_read_per_join": "352"
},
"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.50",
"eval_cost": "0.11",
"prefix_cost": "22.61",
"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 |
| 10965 |
306M |
| 10966 |
306M |
| 10967 |
306M |
| 10968 |
306M |
| 10969 |
306M |
| 10970 |
306M |
| 10971 |
306M |
| 10972 |
306M |
| 10973 |
306M |
| 10974 |
306M |
| 10975 |
306M |
| 10976 |
306M |
| 10977 |
306M |
| 10978 |
306M |
| 10979 |
306M |
| 10980 |
306M |
| 10981 |
306M |
| 10982 |
306M |
| 10983 |
306M |
| 10984 |
306M |