Query time 0.00213
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "51.66"
},
"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": 58,
"rows_produced_per_join": 58,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (2522,2719,2728,3021,3022,3385,3386,3593,3594,3373,4124,4125,5861,5860,6041,6042,6043,6044,6045,6046,6047))",
"cost_info": {
"read_cost": "25.56",
"eval_cost": "5.80",
"prefix_cost": "31.36",
"data_read_per_join": "928"
},
"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": "14.50",
"eval_cost": "0.29",
"prefix_cost": "51.66",
"data_read_per_join": "9K"
},
"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 |
| 2522 |
423,424,452,166M |
| 2719 |
423,424,450,166M |
| 2728 |
423,424,450,166M |
| 3021 |
329,166,344M |
| 3022 |
166,329,344M |
| 3373 |
329,166,344M |
| 3385 |
423,424,450,166M |
| 3386 |
423,424,450,166M |
| 3593 |
329,166,457M |
| 3594 |
166,329,457M |
| 4124 |
329,166,344M |
| 4125 |
166,329,344M |
| 5860 |
572,372,582M |
| 5861 |
372,572,582M |
| 6041 |
423,166,585M |
| 6042 |
423,166,585M |
| 6043 |
423,166,585M |
| 6044 |
423,166,585M |
| 6045 |
423,166,585M |
| 6046 |
423,166,585M |
| 6047 |
166,423,585M |