Query time 0.00154
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "25.24"
},
"grouping_operation": {
"using_filesort": false,
"nested_loop": [
{
"table": {
"table_name": "cscart_products_categories",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"link_type",
"pt"
],
"key": "pt",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"rows_examined_per_scan": 44,
"rows_produced_per_join": 44,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "4.68",
"eval_cost": "4.40",
"prefix_cost": "9.08",
"data_read_per_join": "704"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (92083,92084,92085,92086,92087,92088,92089,91297,92139,92140,92141,92142,92143,92144,92145,86380,92043,92044,92045,92046,92047,92048,92049,92059,92060,92061,92062,92063,92064,92065))"
}
},
{
"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": [
"nuie_scalesta_net.cscart_products_categories.category_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 2,
"filtered": "5.00",
"cost_info": {
"read_cost": "11.00",
"eval_cost": "0.22",
"prefix_cost": "24.48",
"data_read_per_join": "5K"
},
"used_columns": [
"category_id",
"usergroup_ids",
"status",
"storefront_id"
],
"attached_condition": "((`nuie_scalesta_net`.`cscart_categories`.`storefront_id` in (0,1)) and ((`nuie_scalesta_net`.`cscart_categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`nuie_scalesta_net`.`cscart_categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`nuie_scalesta_net`.`cscart_categories`.`usergroup_ids`))) and (`nuie_scalesta_net`.`cscart_categories`.`status` in ('A','H')))"
}
},
{
"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",
"nuie_scalesta_net.cscart_products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 2,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.55",
"eval_cost": "0.22",
"prefix_cost": "25.25",
"data_read_per_join": "35"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 86380 |
7185M |
|
| 91297 |
7185M |
|
| 92043 |
7187,7184M |
0 |
| 92044 |
7187,7184M |
0 |
| 92045 |
7187,7184M |
0 |
| 92046 |
7187,7184M |
0 |
| 92047 |
7187,7184M |
0 |
| 92048 |
7187,7184M |
0 |
| 92049 |
7187,7184M |
0 |
| 92059 |
7187,7184M |
0 |
| 92060 |
7187,7184M |
0 |
| 92061 |
7187,7184M |
0 |
| 92062 |
7187,7184M |
0 |
| 92063 |
7187,7184M |
0 |
| 92064 |
7187,7184M |
0 |
| 92065 |
7187,7184M |
0 |
| 92083 |
7188M |
|
| 92084 |
7188M |
|
| 92085 |
7188M |
|
| 92086 |
7188M |
|
| 92087 |
7188M |
|
| 92088 |
7188M |
|
| 92089 |
7188M |
|
| 92139 |
7186M |
|
| 92140 |
7186M |
|
| 92141 |
7186M |
|
| 92142 |
7186M |
|
| 92143 |
7186M |
|
| 92144 |
7186M |
|
| 92145 |
7186M |
|