Query time 0.00146
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "380.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": 458,
"rows_produced_per_join": 458,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (11088,11089,11087,11109,11108,11110,11111,11263,11265,11336,11339,11340,11343,11345,11346,11366,11367,11370,11371,11394,11395,11396,11397,11398,11406,11407,11422,11423,11424,11425,11426,11427,11428,11429,11434,11435,11436,11469,11470,11471,11487,11488,11489,11490,11491,11492,11493,11494,11495,11505,11506,11507,11517,11518,11519,11592,11593,11594))",
"cost_info": {
"read_cost": "174.81",
"eval_cost": "45.80",
"prefix_cost": "220.61",
"data_read_per_join": "7K"
},
"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": 22,
"filtered": "5.00",
"cost_info": {
"read_cost": "114.50",
"eval_cost": "2.29",
"prefix_cost": "380.91",
"data_read_per_join": "71K"
},
"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 |
| 11087 |
664M |
| 11088 |
664M |
| 11089 |
664M |
| 11108 |
664M |
| 11109 |
664M |
| 11110 |
664M |
| 11111 |
664M |
| 11263 |
664M |
| 11265 |
664M |
| 11336 |
664M |
| 11339 |
664M |
| 11340 |
664M |
| 11343 |
664M |
| 11345 |
664M |
| 11346 |
664M |
| 11366 |
664M |
| 11367 |
664M |
| 11370 |
664M |
| 11371 |
664M |
| 11394 |
664M |
| 11395 |
664M |
| 11396 |
664M |
| 11397 |
664M |
| 11398 |
664M |
| 11406 |
664M |
| 11407 |
664M |
| 11422 |
664M |
| 11423 |
664M |
| 11424 |
664M |
| 11425 |
664M |
| 11426 |
664M |
| 11427 |
664M |
| 11428 |
664M |
| 11429 |
664M |
| 11434 |
664M |
| 11435 |
664M |
| 11436 |
664M |
| 11469 |
664M |
| 11470 |
664M |
| 11471 |
664M |
| 11487 |
664M |
| 11488 |
664M |
| 11489 |
664M |
| 11490 |
664M |
| 11491 |
664M |
| 11492 |
664M |
| 11493 |
664M |
| 11494 |
664M |
| 11495 |
664M |
| 11505 |
664M |
| 11506 |
664M |
| 11507 |
664M |
| 11517 |
664M |
| 11518 |
664M |
| 11519 |
664M |
| 11592 |
664M |
| 11593 |
664M |
| 11594 |
664M |