{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "34.24"
},
"grouping_operation": {
"using_temporary_table": true,
"using_filesort": true,
"cost_info": {
"sort_cost": "4.54"
},
"nested_loop": [
{
"table": {
"table_name": "cscart_categories",
"access_type": "ALL",
"possible_keys": [
"PRIMARY",
"c_status",
"p_category_id"
],
"rows_examined_per_scan": 59,
"rows_produced_per_join": 2,
"filtered": "4.00",
"cost_info": {
"read_cost": "6.40",
"eval_cost": "0.24",
"prefix_cost": "6.64",
"data_read_per_join": "6K"
},
"used_columns": [
"category_id",
"storefront_id",
"usergroup_ids",
"status"
],
"attached_condition": "((`wearethehelpful_scalesta_net`.`cscart_categories`.`storefront_id` in (0,1)) and ((`wearethehelpful_scalesta_net`.`cscart_categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`wearethehelpful_scalesta_net`.`cscart_categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`wearethehelpful_scalesta_net`.`cscart_categories`.`usergroup_ids`))) and (`wearethehelpful_scalesta_net`.`cscart_categories`.`status` in ('A','H')))"
}
},
{
"table": {
"table_name": "cscart_products_categories",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"pt"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"ref": [
"wearethehelpful_scalesta_net.cscart_categories.category_id"
],
"rows_examined_per_scan": 26,
"rows_produced_per_join": 4,
"filtered": "7.39",
"index_condition": "(`wearethehelpful_scalesta_net`.`cscart_products_categories`.`product_id` in (1092,967,966,965,946,517,516,515,478,477,476,475,474,428,427,400,399,398,356))",
"cost_info": {
"read_cost": "15.34",
"eval_cost": "0.45",
"prefix_cost": "28.11",
"data_read_per_join": "72"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
]
}
},
{
"table": {
"table_name": "product_position_source",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"pt"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id",
"product_id"
],
"key_length": "6",
"ref": [
"const",
"wearethehelpful_scalesta_net.cscart_products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 4,
"filtered": "100.00",
"cost_info": {
"read_cost": "1.13",
"eval_cost": "0.45",
"prefix_cost": "29.70",
"data_read_per_join": "72"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
| product_id | category_ids | position |
|---|---|---|
| 356 | 266,267M,282,288,276,297,299,303,329 | 0 |
| 398 | 266,267M,282,286,276,297,301,303 | 0 |
| 399 | 266,267M,282,286,276,297,301,303 | 0 |
| 400 | 266,267M,282,286,276,297,301,303 | 0 |
| 427 | 267,282,286,276M | 0 |
| 428 | 267,282,286,276M | 0 |
| 474 | 265,266,267,268,270M,282,297,303,318,325 | 0 |
| 475 | 265,266,267,268,270M,282,297,301,303,318,325 | 0 |
| 476 | 265,266,267,268,270M,282,297,301,303,318,325 | 0 |
| 477 | 265,266,267,268,270M,282,278,297,301,303,318,322,325 | 0 |
| 478 | 265,266,267,268,270M,282,278,297,301,303,317,318,322,325 | 0 |
| 515 | 265M,266,267,268,282,288,294,276,277,278,297,298,301,303,314,317,318,321,322,325 | 0 |
| 516 | 265M,266,267,268,282,288,294,276,297,298,301,303,314,325 | 0 |
| 517 | 265M,266,267,268,282,288,294,276,277,278,297,298,301,303,314,317,318,321,322,325 | 0 |
| 946 | 267,282,277,297,303 | 0 |
| 965 | 266,267,282,286,276,297,301M,303,326 | 0 |
| 966 | 266,267,282,286,276,297,301M,303,326 | 0 |
| 967 | 266,267,282,286,295,276,277,278,297,301M,311,326 | 0 |
| 1092 | 266M,267,282,286,276,297,301,326 | 0 |